8000 Add dtype/copy args to internal testing class by dstansby · Pull Request #27862 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Add dtype/copy args to internal testing class #27862

New issue 8000

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

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

dstansby
Copy link
Member
@dstansby dstansby commented Mar 4, 2024

PR summary

This fixes some test failures in #27844 that we're responsible for. I'm guessing the new requirement on copy/dtype args is from numpy 2.0. I'm not sure if there's a way to run the weekly CI on a PR to check this fixes the issue?

PR checklist

@ksunden
Copy link
Member
ksunden commented Mar 4, 2024

I do believe the immediate need for this has been taken care of upstream (numpy/numpy#25922) but this is still likely good for future proofing...

However, I think there is a chance it needs to be a touch more complicated than this to avoid sending the copy kwarg to older versions of numpy... (I'll wait for CI to run, as it should show up on current CI if it is a problem)

We do not have the nightly test set up to run on e.g. a label like some other tests. (And in fact can't even run it off schedule at all... it is actually just the normal tests workflow that adds the nightly repo and --pre if and only if the trigger "event name" field is schedule...) It could probably be reworked, but the need for it is relatively rare, so not sure its worth the time to do so.

@dstansby dstansby marked this pull request as draft March 5, 2024 08:33
@dstansby dstansby marked this pull request as ready for review March 5, 2024 10:57
@dstansby
Copy link
Member Author
dstansby commented Mar 5, 2024

I'm not 100% sure I've implemented this in the best way - for a small internal testing class I think it's probably fine though?

@ksunden
Copy link
Member
ksunden commented Mar 6, 2024

Maybe leave ourselves a comment that once we drop numpy 1.x support this can just be np.asarray(..., copy=copy) Not the highest priority to change it at that point, but it can be simpler then

@tacaswell tacaswell added this to the v3.9.0 milestone Mar 6, 2024
@QuLogic QuLogic merged commit 2d5e293 into matplotlib:main Mar 7, 2024
@dstansby dstansby deleted the kernel-array branch March 7, 2024 09:37
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.

4 participants
0