-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Np error patch #3188
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
Np error patch #3188
Conversation
fixes some of the issues raised in matplotlib#3186
Addresses the remaining errors from matplotlib#3186
I was confused, we don't need to fix this asap as the np devs are trying to not break us (and are converting errors to warnings). |
@tacaswell, it's not 100% essential to fix it immediately--but it is very much the right thing to do, and it should be do-able. Thanks for writing the PR. |
@tacaswell, it looks like a random Travis failure on 3.2, unrelated to the PR. |
@efiring It's not random, it happens every time. Something is going wrong in the setup script and I'm pretty sure that it is from the Qt5 support merge. I have been holding off on tracking it down on the hope that we would just drop support for 3.2 (IPython has) so it wouldn't be a problem. |
Given how slow our release cycle is, we definitely should fix this now for On Sat, Jul 5, 2014 at 8:32 PM, Eric Firing [email protected]
|
@tacaswell Thanks for coming up with a candidate fix; I hope to take a look at it tomorrow evening. We should also ask @GBillotey to take a look at it as he wrote lots of the original code. |
I am reviewing it right now as well. I am wondering if we are papering over a deeper problem. |
Indeed, there is a deeper issue. The issue occurs when doing the CubicTriInterpolator with return key of "dxdz" or "dzdx". This goes through a different code path that calculates the jacobian. It appears that it is expecting the returned result to be Nx2, but it is coming back as 1xNx2. The slicing returns a 1xN array when it should be just a length N array. |
Correction... it produces Nx2x1 arrays, and the slicing produces Nx1 arrays. |
OK, I have taken a look at this. The changes to Thanks to @WeatherGod for finding the root cause of the other issue. To clarify, the Nx2x1 array is returned from I have confirmed that with these changes we no longer get the FutureWarnings when running the tests and examples using the latest numpy master, and the rather older numpy 1.6 is fine. @tacaswell: If you would rather I just wrote another PR with these changes rather than you modifying this one then let me know. |
Please write a PR against this one. |
BUG: improved fix for np 1.9 errors
@tacaswell The failure on 3.2 appears to be related to this bug which reports it to be a problem between garbage collection and Finalizer callbacks. The changeset was applied to 2.7 and to the 'default' branch on 25 May 2012, which is after the 3.2 release date (but before 3.3). The fix would be to either avoid multiprocessing on 3.2 (although Gtk3 uses it also) or catch the exception that is thrown and carry on regardless. That would allow the build to complete. If support for 3.2 is staying I'm happy to fix this up and submit a PR. |
@mfitzp Thanks for tracking this down! A PR would be great. I think we are planning to stop testing on 3.2, but it would be good to not leave the (hopefully small) 3.2 user base in the lurch. |
These two commits should close #3186.
@ianthomas23 Can you review this?