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
make sure marker colors also accept np.array, fixes #8750 #8757
Conversation
Ah well, it seems np.array_equal doesn't work with numpy-1.7.1.
Back to the drawing board. |
Huh. It is weird because one can find these kind of functions in the 1.5 reference guide. See for example np.equal, np.array_equal or np.array_equiv. Edit:
|
Internally colors should be 4-tuples for actual colors or strings for 'special' values (like 'none', 'edge', or 'auto'). I think @anntzer made great progress on this actually being true. Instead of trying to run this through numpy, just checking |
@afvincent Ok, so the problem is that in numpy-1.7.1 array_equal uses
which trips on NotImplemented but starting with 1.8 it is
|
How about |
Or |
Thanks, @dstansby! Not sure what the failing codecov/patch check wants to tell me. |
I'm not entirely sure why |
thanks! |
PR Summary
Setting markerface/edgecolor with an np.array leads to a ValueError with numpy-1.13. See #8750 As suggested in the issue thread I replaced the comparison with np.array_equal(). I modified the unit test for marker styles to test a range of color specifications.
PR Checklist
First PR to matplotlib. Hope this is fine.