{{ message }}
Catch ValueError to support pytorch (and others) plotting - #26807
Merged
Merged
Conversation
jklymak
approved these changes
Sep 18, 2023
jklymak
left a comment
Member
There was a problem hiding this comment.
This seems fine. For patches like this, though, it would be nice to know why it broke in the first place to be sure that the raise was unintentional.
Member
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Sep 18, 2023
…d others) plotting
Member
|
This was last changed in #26303, and it indeed was made more strict there, though I think inadvertently. (Not a huge fan of micro optimizations for the reason of unintended consequences). I don't see the harm in allowing a ValueError through, OTOH, pytorch should probably return an error consistent with numpy if they want maximum compatibility. |
jklymak
added a commit
that referenced
this pull request
Sep 18, 2023
…807-on-v3.8.x Backport PR #26807 on branch v3.8.x (Catch ValueError to support pytorch (and others) plotting)
Member
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
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.

PR summary
Closes #26806
Not sure we should add it, but will probably help other libraries as well (that we do not formally support).
No way of testing on the CI as we do not want to install torch, but I promise that it works locally. 😉
PR checklist