Open eschombu opened 1 week ago
I agree for the flexibility and I think the new argument for IntervalSet makes sense. For TsGroup, I would not do it as I can see it being hard to maintain on the long run. In this case, forcing to pass an IntervalSet is probably easier.
It's a bit counter-intuitive sometimes to split up a sequence of intervals into the starts and ends, and easier sometimes to write a sequence of start-end pairs. This change allows the
IntervalSet
to accept such a sequence of pairs, or a single pair.Example:
I also added the capability to pass a variable that can be used for
IntervalSet
creation to thetime_support
parameter duringTsGroup
initialization. Meaning, iftime_support
is not anIntervalSet
instance,time_support = IntervalSet(time_support)
will be attempted.I added tests and updated the doc string. This is my first PR to the repo, so more than happy for feedback on: