Expand ScalarMappable.set_array to accept array-like inputs#18870
Expand ScalarMappable.set_array to accept array-like inputs#18870jklymak merged 6 commits intomatplotlib:masterfrom
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
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 <[email protected]>
|
@jklymak does this still require comment/discussion (label)? |
PR Summary
imshowallowsset_arrayto pass lists,Collectiondoes not. (Since_ImageBaseoverridesset_arrayofScalarMappable, adding the ability to passarray-likeinputs, and copy the input so changing list after calling function doesn't affect the plots)This PR expands the
ScalarMappableclass to make a copy of the original input and casting it to arrays.Fixes #18841
PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand 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).