I've got pairs of years that look like this
timespans = [[1200, 1400], [150, 230]]
and can't see how to generate a multi-component interval looking like this via iteration:
interval([150.0, 230.0], [1200.0, 1400.0])
I have tried several things, including these
k = interval(t for t in timespans)k = interval(tuple(t) for t in timespans)
which return an "Invalid interval component" error
k = interval(interval(t) for t in timespans)
results in interval([150.0, 1400.0]), which is not multi-component and won't work for the operations I want
k=interval(timespans[0],timespans[1]) gets the right result, but I can't find a way to generate it from a list
I've got pairs of years that look like this
timespans = [[1200, 1400], [150, 230]]
and can't see how to generate a multi-component interval looking like this via iteration:
interval([150.0, 230.0], [1200.0, 1400.0])
I have tried several things, including these
k = interval(t for t in timespans)
k = interval(tuple(t) for t in timespans)
which return an "Invalid interval component" errork = interval(interval(t) for t in timespans)
results ininterval([150.0, 1400.0])
, which is not multi-component and won't work for the operations I wantk=interval(timespans[0],timespans[1])
gets the right result, but I can't find a way to generate it from a listcan you help?