Skip to content

Check that stem input is 1D #30233

New issue

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Check that stem input is 1D #30233

wants to merge 1 commit into from

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Jul 1, 2025

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

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.
Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

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

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
2 participants