FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Check that stem input is 1D by QuLogic · Pull Request #30233 · matplotlib/matplotlib · GitHub

Check that stem input is 1D - #30233

Merged
dstansby merged 1 commit into
matplotlib:mainfrom
QuLogic:stem-1d
Jul 6, 2025
Merged

Check that stem input is 1D#30233
dstansby merged 1 commit into
matplotlib:mainfrom
QuLogic:stem-1d

Conversation

QuLogic commented Jul 1, 2025

Copy link
Copy Markdown
Member

PR summary

This also has the side-effect of casting torch Tensors to NumPy arrays, which fixes #30216. Since stem is made up of plot and [hv]lines whic already do this cast, this just moves it up one level which prevents doing it twice.

We don't have any testing with torch directly, so I didn't add any of that sort.

PR checklist

timhoffm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I've not analyzed the details, but is _check_1d compatible with unit hanling? hlines/vlines do _proces_unit_info as their first task.

QuLogic commented Jul 4, 2025

Copy link
Copy Markdown
Member Author

I did insert this after stem does its own _process_unit_info calls. At least there's a datetime test for stem in test_datetime that didn't seem to break.

This also has the side-effect of casting torch Tensors to NumPy arrays,
which fixes matplotlib#30216. Since `stem` is made up of `plot` and `[hv]lines`
whic already do this cast, this just moves it up one level which
prevents doing it twice.
dstansby added this to the v3.10.4 milestone Jul 6, 2025
dstansby merged commit 947590d into matplotlib:main Jul 6, 2025
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jul 6, 2025
dstansby added a commit that referenced this pull request Jul 6, 2025
…233-on-v3.10.x

Backport PR #30233 on branch v3.10.x (Check that stem input is 1D)
QuLogic deleted the stem-1d branch July 6, 2025 22:58
ksunden mentioned this pull request Aug 7, 2025
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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]: stem complaining about PyTorch's Tensor

3 participants


Back | FazBrowse Home | New Git URL