-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Expand ScalarMappable.set_array to accept array-like inputs #18870
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
Expand ScalarMappable.set_array to accept array-like inputs #18870
Conversation
Note: I didn't pay much attention to the test, as I think it would be better to change the |
e7efa10
to
9b926fd
Compare
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.
This seems like something @efiring just looked at?
If that fixes the problem more places, I'd suggest proposing that instead... As it is, this PR is a little scanty on justification. |
|
9b926fd
to
1e017ed
Compare
I made the changes, but I'm not sure about the location of the test; there's no |
I updated the PR summary, hopefully making this a bit easier to understand. |
If #18480 goes in, |
I'm going to mark as draft until #18480 can be finished but please ping us if that takes too long! |
a071304
to
9cc32b0
Compare
Rebased, finished the tests and handled this^ |
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
@jklymak does this still require comment/discussion (label)? |
PR Summary
imshow
allowsset_array
to pass lists,Collection
does not. (Since_ImageBase
overridesset_array
ofScalarMappable
, adding the ability to passarray-like
inputs, and copy the input so changing list after calling function doesn't affect the plots)This PR expands the
ScalarMappable
class to make a copy of the original input and casting it to arrays.Fixes #18841
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).