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

Keep metadata when starts and ends are sorted in the same way (i.e. out of order intervals) #387

Open
sjvenditto opened this issue Jan 7, 2025 · 0 comments

Comments

@sjvenditto
Copy link
Collaborator

Right now whenever starts and ends are sorted, metadata is always dropped since the constructor doesn't know how whether to align the metadata to the sorted start or sorted end times. We should make an exception and keep metadata when they are sorted in the same way, in the case when intervals are just out of order and not actually changed, which has a clear mapping back to the metadata.

A simple fix to this is just to use argsort in place of sort and compare that the indices match between start and end sorts in order to keep metadata

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