-
Notifications
You must be signed in to change notification settings - Fork 30
Test for numpy issue 6133 #143
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
Conversation
Looks like Travis is hit by this bug. That probably means we need to change the numpy version it uses. @maffoo what's the deal here? |
Is this numpy issue used in pylabrad? If so, do we want to add a note in the readme file along with a check when pylabrad is imported to warn users not to use Python 2.7.6/Numpy 1.9.2? Perhaps a check like in the pyle init file? |
@maffoo I'd be happy to see what's going on with Travis but I need access. Where is it? |
@DanielSank, on the PR page by the failed check there should be a Details link that takes you to travis with the build results. It should all be public, but let me know if you can't see it. Just in case, the page for this most recent build failure is here. |
@maffoo yes, but my point is that it's failing because the bug we say on our machines yesterday is happening on Travis. This is probably a numpy bug, so perhaps we should consider going to an older (and lab standard) version. I can't do that myself... |
just change .travis.yml in your branch and push. That file (and some scripts that it references) are what define the test. You can specify versions of numpy or other dependencies there. Right now it just grabs the latest for everything. |
Aha! Thanks. |
@DanielSank, what's the status here? The docstring seems to indicate you wanted to investigate the numpy bug more. |
The status is I forgot about this. If you want to fix the travis go ahead. Sorry, I'm prepping for group meeting atm. |
I tracked this down a bit further. The problem is that DimesionlessFloat has an array_priority set, but it can't handle math operations where "other" is a numpy array type since it just delegates to float which doesn't understand arrays. It returns NotImplemented (correctly), but numpy's array_priority machinery doesn't handle this case. numpy 1.9 converts numpy scalars to arrays before calling arithmetic operations, while numpy 1.8 does not. I found an equivalent bug in numpy 1.8:
The latter result being correct. |
I folded this into a PR that fixes the bug. |
This PR adds a check to make sure we aren't hit by numpy issue 6133.