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

Fix is_sorted_and_has_non_nan for byteswapped inputs. #27595

Merged
merged 1 commit into from Jan 4, 2024

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 3, 2024

Closes #25995.

PR summary

PR checklist

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other option would be to make the template in _path.h byte order aware and/or extend the case statement.

However, given that we do not run into this in our own usage it is not worth the extra work to avoid a memory copy (despite I suspect the point of this helper function being to avoid memory copies).

@tacaswell tacaswell added this to the v3.8.3 milestone Jan 3, 2024
@tacaswell
Copy link
Member

There were two failures of a memory leak check with wxagg on ubuntu for py39 and py310. That might just be bad luck.

There has not been a new wxpython release so I do not suspect and upstream change. The reference counting looks correct here. I do not think there is any change in semantics between PyArray_CheckFromAny and PyArray_FromAny and if we always pass in native arrays there should be no difference in our tests.

@QuLogic QuLogic merged commit 3a2a9d9 into matplotlib:main Jan 4, 2024
38 of 40 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jan 4, 2024
@anntzer anntzer deleted the ishnnbs branch January 4, 2024 07:36
QuLogic added a commit that referenced this pull request Jan 4, 2024
…595-on-v3.8.x

Backport PR #27595 on branch v3.8.x (Fix is_sorted_and_has_non_nan for byteswapped inputs.)
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

Successfully merging this pull request may close these issues.

[Bug]: _path.is_sorted is wrong for the non-native byteorder case
3 participants