Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove unnecessary norm typecheck in tripcolor(). #25454

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

Merged
merged 1 commit into from
Mar 14, 2023
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Mar 14, 2023

The check was overly restrictive (str inputs work just fine per normal ScalarMappable API) and we can just let the TriMesh/PolyCollection ctors handle the validation.

Closes #25453.

PR Summary

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

The check was overly restrictive (str inputs work just fine per normal
ScalarMappable API) and we can just let the TriMesh/PolyCollection ctors
handle the validation.
Copy link
Member

@oscargus oscargus left a comment

Choose a reason for hiding this comment

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

Should one add a test with string input to make sure that it keeps supporting that?

@anntzer
Copy link
Contributor Author

anntzer commented Mar 14, 2023

We just inherit that from the super-class; I wouldn't bother.

@ksunden ksunden added this to the v3.8.0 milestone Mar 14, 2023
@ksunden ksunden merged commit 3237401 into matplotlib:main Mar 14, 2023
@anntzer anntzer deleted the tn branch March 14, 2023 21:45
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.

[ENH]: Let norm argument accept string values in tripcolour
3 participants