-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
1.1.1: TestPhysicsSphericalRepresentation failure with numpy 1.11.0 beta 2 #4548
Comments
There is another failure (from the same log that may have the same cause:
|
Hmm, similar failures in recent travis tests against master. Looks like rounding issues, but unclear why those did not turn up before. |
Filed numpy/numpy#7161 to track -- please do report these things upstream! We want to know! :-) Nothing comes to mind as an obvious cause, but it seems eminently bisectable if someone wants to try. (Basically: write a little script that exits successfully if the test passes and exits with an error code if the test fails, then clone numpy and do |
The two The
looks like somehow there's a type error? This feels like the sort of bug that @mhvk always comes hassling us about as soon as we release a new version, like maybe we aren't preserving types properly somewhere :-) |
@njsmith - thanks very much for investigating! I'm still overwhelmed with graduate admission, but will try to have a look. The type change is fine in this case -- the intent is just to test the values, not the class -- though the test should probably be changed just so there is no confusion. |
The type error is probably because scalar math remainder is now done using c operators instead of calling the ufunc fmod. This could be a problem with other scalar functions that don't use ufuncs... |
I just installed numpy 1.9.3 + astropy 1.1.1, and that configuration shows the same funny types as are reported above -- so unless someone tells me otherwise, I'm going to assume that the only change in numpy 1.11 is that the division rounding is slightly different (and more consistent, see numpy/numpy@34c2369 for details), and that the only issue here is that astropy has some tests that are a bit too strict. ( If that's wrong and there's something in numpy causing a genuine problem, please let us know and comment here or re-open numpy/numpy#7161; otherwise we'll assume that this is not a blocker for the numpy 1.11 release. |
@njsmith - Agreed with your analysis, and funny that it an issue I raised myself that has returned to bite us (though, as you said, in a way that just exposes that our tests were to strict; am still a bit surprised about that, as I thought I wrote them on purpose in integer degrees, so rounding errors should not be a problem; but anyway, that would be on our side too). |
I haven't looked at the actual change in detail -- so it's possible that
|
The reason they are not identical is that the input value angles are always wrapped with |
Check that it still happens with numpy 1.11rc1 or so before making any changes -- the handling of mod for reworked a bit in response to issues like this. |
While we may want to consider using |
In fact, now that the tests worked, I think we should consider this fixed. I do like the idea that one can use equality on integer numbers, and in this case finding this bug has led to what I think is a very nice improvement in numpy, so all would seem well! |
p.s. thanks for reporting, @olebole |
There are two failures in
TestPhysicsSphericalRepresentation
with the new numy beta release:This code worked well with numpy-1.10. wcslib version for both (just in case that it matters) is 5.13.
Full test log here
The text was updated successfully, but these errors were encountered: