GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — MNT: do not assign a numpy array shape by rcomer · Pull Request #30985 · matplotlib/matplotlib

Conversation

@rcomer

@rcomer rcomer commented Jan 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

  • "closes #0000" is in the body of the PR description to link the related issue
  • new and changed code is tested
  • [n/a] Plotting related features are demonstrated in an example
  • [n/a] New Features and API Changes are noted with a directive and release note
  • [n/a] Documentation complies with general and docstring guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rcomer
MNT: do not assign a numpy array shape
000f898
@rcomer rcomer added this to the v3.10.9 milestone Jan 17, 2026
timhoffm
timhoffm approved these changes Jan 17, 2026
View reviewed changes
scottshambaugh
scottshambaugh approved these changes Jan 17, 2026
View reviewed changes
@scottshambaugh
scottshambaugh merged commit 4a2222c into matplotlib:main Jan 17, 2026
50 of 51 checks passed

Uh oh!

There was an error while loading. Please reload this page.

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jan 17, 2026
@scottshambaugh @meeseeksmachine
Backport PR matplotlib#30985: MNT: do not assign a numpy array shape
89a35d8
@meeseeksmachine meeseeksmachine mentioned this pull request Jan 17, 2026
Backport PR #30985 on branch v3.10.x (MNT: do not assign a numpy array shape) #30986
Merged
@rcomer
rcomer deleted the numpy-shape branch January 17, 2026 20:02
timhoffm added a commit that referenced this pull request Jan 17, 2026
@timhoffm
Merge pull request #30986 from meeseeksmachine/auto-backport-of-pr-30…
50d13e4
…985-on-v3.10.x

Backport PR #30985 on branch v3.10.x (MNT: do not assign a numpy array shape)
wavebyrd pushed a commit to wavebyrd/matplotlib that referenced this pull request Mar 13, 2026
@scottshambaugh @meeseeksmachine
Backport PR matplotlib#30985: MNT: do not assign a numpy array shape
0816be4
wavebyrd pushed a commit to wavebyrd/matplotlib that referenced this pull request Mar 13, 2026
@timhoffm
Merge pull request matplotlib#30986 from meeseeksmachine/auto-backpor…
10a7915
…t-of-pr-30985-on-v3.10.x

Backport PR matplotlib#30985 on branch v3.10.x (MNT: do not assign a numpy array shape)
This was referenced Apr 21, 2026
Backport PR #31282 on branch v3.10.x (SEC: Block shell escapes in latex and ps commands) #31542
Closed
Backport PR #31248 on branch v3.10.x (SEC: Remove eval() from validate_cycler) #31543
Closed
merge up v3.10.9 #31560
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@timhoffm timhoffm timhoffm approved these changes
@scottshambaugh scottshambaugh scottshambaugh approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

v3.10.9

Development

Successfully merging this pull request may close these issues.

[TST] Upcoming dependency test failures

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@rcomer @timhoffm @scottshambaugh
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.