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
Fix streamplot when color argument has NaNs #1514
Conversation
Bug report and fix provided by Jon Ramsey.
@tonysyu Could you also add a test for this so we don't run into it again? |
@dmcdougall Good point. I just added tests for streamplot. Note that I'm on OS X, which marks SVG tests as KnownFails. I'm not sure if this is due to issues with the testing infrastructure or with the generation of SVGs on OS X, but if it's the latter I assume someone else will need to replace the SVGs that I pushed. |
Thanks for adding the tests @tonysyu. Just to note, the comparison files such as Cheers, |
@pelson Thanks for the help. Fixed. |
Does anyone know what the situation is here? @tonysyu Do you have inkscape installed? That might be why you're getting |
@dmcdougall I do actually have inkscape installed, but it appears that I have the CLI for inkscape linked in some incompatible way. I'll look into fixing this, but I'm a bit short on time. Do you know if the tests fail on your system using the SVGs in this PR? |
$ python tests.py matplotlib.tests.test_streamplot
....../opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/ma/core.py:3785: UserWarning: Warning: converting a masked element to nan.
warnings.warn("Warning: converting a masked element to nan.")
...
----------------------------------------------------------------------
Ran 9 tests in 24.685s
OK |
Thanks for checking the SVG tests @dmcdougall. I guess that means the SVG test images are fine. Is there anything else I should add/fix for this PR? |
@tonysyu Nope, you're good. Merging. |
Fix streamplot when color argument has NaNs
Bug report and fix provided by Jon Ramsey.