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 — Change `.T` to `.transpose()` in `_reshape_2D` by mtsokol · Pull Request #29896 · matplotlib/matplotlib

Conversation

@mtsokol

@mtsokol mtsokol commented Apr 10, 2025

Copy link
Copy Markdown
Contributor

Hi!

This PR introduces a small change to lib/matplotlib/cbook.py. To make .T Array API compatible it must raise an exception for scalar arrays and arrays with ndim != 2.
In numpy/numpy#28678 we first introduce a warning for that purpose.

matplotlib that is used in NumPy docs-check CI job causes a failure by raising multiple warnings from plt.hist. This backward-compatible change fixes it. .transpose() stays the same as it isn't covered in Array API.

Sorry, something went wrong.

Uh oh!

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

All reactions
@mtsokol
Change .T to .transpose() in _reshape_2D
a29212c
@mtsokol mtsokol mentioned this pull request Apr 10, 2025
DEP: Deprecate .T property for non-2dim arrays and scalars numpy/numpy#28678
Merged
@tacaswell tacaswell added this to the v3.10.2 milestone Apr 10, 2025
tacaswell
tacaswell approved these changes Apr 10, 2025
View reviewed changes
@story645
story645 merged commit 26d482b into matplotlib:main Apr 10, 2025
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Apr 10, 2025
@story645 @meeseeksmachine
Backport PR matplotlib#29896: Change .T to .transpose() in `_resh…
7470a81
…ape_2D`
@meeseeksmachine meeseeksmachine mentioned this pull request Apr 10, 2025
Backport PR #29896 on branch v3.10.x (Change .T to .transpose() in _reshape_2D) #29900
Merged
@story645 story645 added the third-party integration label Apr 10, 2025
timhoffm added a commit that referenced this pull request Apr 10, 2025
@timhoffm
Merge pull request #29900 from meeseeksmachine/auto-backport-of-pr-29…
fe0140e
…896-on-v3.10.x

Backport PR #29896 on branch v3.10.x (Change `.T` to `.transpose()` in `_reshape_2D`)
@mtsokol
mtsokol deleted the cbook-_reshape_2D-tweak branch April 11, 2025 08:40
@ksunden ksunden mentioned this pull request May 9, 2025
merge up 3.10.3 #30031
Closed
5 tasks
@ksunden ksunden mentioned this pull request Jul 25, 2025
Manual Backport PR #30195 on branch v3.10.x (ci: Enable wheel builds on Python 3.14) #30356
Merged
5 tasks
@ksunden ksunden mentioned this pull request Aug 7, 2025
merge up v3.10.5 #30401
Merged
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tacaswell tacaswell tacaswell approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

third-party integration

Projects

None yet

Milestone

v3.10.3

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

3 participants

@mtsokol @tacaswell @story645
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.