Skip to content

Conversation

@rcomer
Copy link
Member

@rcomer rcomer commented Jan 17, 2026

PR summary

Fixes #30981. Numpy has deprecated assigning a shape to an array.

https://numpy.org/devdocs/release/2.5.0-notes.html#setting-the-shape-attribute-is-deprecated

>       z_data.shape = shape
        ^^^^^^^^^^^^
E       DeprecationWarning: Setting the shape on a NumPy array has been deprecated in NumPy 2.5.
E       As an alternative, you can create a new view using np.reshape (with copy=False if needed).

PR checklist

@rcomer rcomer added this to the v3.10.9 milestone Jan 17, 2026
@scottshambaugh scottshambaugh merged commit 4a2222c into matplotlib:main Jan 17, 2026
50 of 51 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jan 17, 2026
@rcomer rcomer deleted the numpy-shape branch January 17, 2026 20:02
timhoffm added a commit that referenced this pull request Jan 17, 2026
…985-on-v3.10.x

Backport PR #30985 on branch v3.10.x (MNT: do not assign a numpy array shape)
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.

[TST] Upcoming dependency test failures

3 participants