Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Tweak shape repr in _api.check_shape error message.#26513
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
lib/matplotlib/_api/__init__.py Outdated
@@ -151,12 +151,10 @@ def check_shape(shape, /, **kwargs): | |||
if (len(data_shape) != len(shape) | |||
or any(s != t and t is not None for s, t in zip(data_shape, shape))): | |||
dim_labels = iter(itertools.chain( | |||
'MNLIJKLH', | |||
'NMLIJKLH', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It's not new, but should L appear in this list twice? That seems odd/likely for unintended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
indeed, fixed.
Fill in "None" dims *from the end* with the letters N, M, L, K, ... soas to get e.g. "(N, 2)", "(M, 2, N)", "(L, M, N)", etc.
…513-on-v3.8.xBackport PR#26513 on branch v3.8.x (Tweak shape repr in _api.check_shape error message.)
Fill in "None" dimsfrom the end with the letters N, M, L, K, ... so as to get e.g. "(N, 2)", "(M, 2, N)", "(L, M, N)", etc.
PR summary
PR checklist