-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix #5693: Implemented is_sorted in C #5719
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
Conversation
Nice! |
tad worried what this will do with large int arrays or pd.Series but so long an np will do the corrosion it should be no worse than it is now (I think). |
Yeah. I think a conversion was already happening in the |
I've updated this to work on ints directly as well. |
Fix #5693: Implemented is_sorted in C
backport on this had conflicts, making sure it works locally before pushing |
Fix #5693: Implemented is_sorted in C Conflicts: lib/matplotlib/lines.py Imports at the top picked up the new markers which are not present on this branch (1.5.x). lib/matplotlib/tests/test_lines.py minor clashes in _is_sorted test, resolved in favor of current branch to ease future mer 8000 ge conflicts
backported as db80928 |
I know this is merged already, but I'm curious as to the expected behaviour with respect to infinities? As you may guess from the name, >>> import numpy as np
>>> x = np.arange(10.)
>>> x[4] = np.inf
>>> x
array([ 0., 1., 2., 3., inf, 5., 6., 7., 8., 9.])
>>> np.nanmin(x[1:] - x[:-1]) >= 0
False
>>> from matplotlib import _path
>>> _path.is_sorted(x)
True Is it just not possible for there to be infinities at this location? |
That is a good point that I think we missed on review. On Wed, Dec 23, 2015 at 6:44 PM Elliott Sales de Andrade <
|
No description provided.