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

Checking if container is sorted #26

Open
jchutrue opened this issue Oct 25, 2017 · 1 comment
Open

Checking if container is sorted #26

jchutrue opened this issue Oct 25, 2017 · 1 comment

Comments

@jchutrue
Copy link
Collaborator

The numpy diff() function returns an array of the same type as its input. This means that we have to be careful about checking whether a generic container is sorted if that container is of an unsigned type. Currently various jagular functions rely on diff(), including get_contiguous_segments() and may have to be modified if necessary.

@eackermann
Copy link
Collaborator

Both is_sorted and is_sorted_np do not rely on np.diff and we should be good to go. There are some other instances of np.diff still scattered around; some are potentially problematic, and some certainly are not, so I'm leaving this open until we have time to do a comprehensive clean-up and vetting.

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

2 participants