Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generating an interval from a list of lists #24

Open
kgeographer opened this issue May 21, 2020 · 0 comments
Open

generating an interval from a list of lists #24

kgeographer opened this issue May 21, 2020 · 0 comments

Comments

@kgeographer
Copy link

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

can you help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant