We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 522cebb commit 83a8182Copy full SHA for 83a8182
pynapple/core/interval_set.py
@@ -201,6 +201,9 @@ def __init__(
201
# since metadata would be dropped if starts and ends are sorted separately
202
# note that if end times are still not sorted, metadata will be dropped
203
if np.any(start["start"].diff() < 0):
204
+ warnings.warn(
205
+ "DataFrame is not sorted by start times. Sorting it.", stacklevel=2
206
+ )
207
start = start.sort_values("start").reset_index(drop=True)
208
209
metadata = start.drop(columns=["start", "end"])
0 commit comments