-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
test_light_source_shading_default and test_light_source_masked_shading fails with numpy 1.9 #3598
Comments
To quote @mdboom quoting one of his bosses, "if you are not breaking the build you aren't writing enough code". It is unreasonable to expect you to do a more through build matrix than we do on travis. This probably means we should test at least one version of python (I advocate for 2.7 and 3.4) with np1.9 on travis. |
Yes we probably should. I don't fully understand why pip doesn't install 1.9 on Travis but the output confirms it. Perhaps it is related to the use of --use-mirrors on travis? |
This is a difference on the edges likely caused by the changes to np.gradient http://mail.scipy.org/pipermail/numpy-discussion/2014-October/071334.html |
Since there is no flag in numpy to restore the old behavior I think the right solution is to exclude the edges in the comparison. I will make a pr |
Can you make those with |
Yes you are right, I actually did that afterwards locally yesterday but I was on an unstable internet connection so I did not upload them. |
I can confirm that replacing numpy gradient with the version from 1.8.2 fixes the issue. (at https://github.com/jenshnielsen/matplotlib/tree/numpy_gradient if anyone should care) but that |
No, we should not start shipping old versions of numpy functions. In the short term, I am inclined to known-fail one or both of those tests with numpy 1.9 while we get this sorted out so that the tests an master are useful again. |
Yes I think we should do that to get the tests passing again on Travis. It was never my intention to suggest that we ship that function. The intention was just to verify that the difference is limited to the gradient function. |
The fundamental reason why this looks so badly is that a lot more elements are makes when the gradient is calculated from a masked array with the new algorithm. |
See http://thread.gmane.org/gmane.comp.python.numeric.general/58971/focus=58975. Noted in np thread, linking here for convenience |
Just as a vote in favor of shipping a simplified gradient function (I realize this is a terrible idea in 99.99% of cases!!): All of the functionality of
Of course, it's probably still a terrible idea, but perhaps not quite as bad of an idea as it might seem at first glance... |
Lets just hold out for the 1.9.1 release of numpy before we decide on this. There are actually to separate issues in numpy. The changes to gradient on the edge in numpy are fixed by numpy/numpy#5203. The differences on the edge can easily be fixed in the test by not comparing the edge sites. The changes to gradient revealed another issues in numpy where the masks of masked arrays were linked (fixed by numpy/numpy#5184) This resulted in strange modification of the input arrays. This may happen to if we roll out our own gradient implementation too. |
These tests are part of #3291 and fail for me with numpy 1.9.0
The tests works with numpy 1.8.2 (on travis and locally). Not sure what is wrong here.
Apologies for not spotting this before the merge.
The text was updated successfully, but these errors were encountered: