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
BUG: recent numpy fails on non-int shape #5297
Conversation
The Travis failures seem to be unrelated to this change. |
Thanks for noticing and providing a fix. I wonder if we could track down why |
I'm remilestoning this -- as it doesn't affect released versions of numpy, I don't think we need to worry about it for 1.5.0 |
@mdboom, isn't this a time-bomb? If the root problem isn't apparent, I would be inclined to accept the patch with the addition of a comment as to its rationale. The requirement that indices be integers is already in effect; I see it in python 3.4 with numpy 1.10.1 at least. |
No, I think we need to get to the root of the problem, not pave it over like this. I can't reproduce on 1.5.x with Python 2.7/3.4 or 3.5 with Numpy 1.10.1. That's what lead me to postpone this, given that 1.5.0 is already way overdue. Can you reproduce it with a released Numpy? |
I don't even know how to to try to reproduce it. I'm OK with your decision. |
I can't even get matplotlib to build with numpy master right now. @perimosocordiae: What was your last working Numpy git hash? |
Here's a script that reproduces the error for me: import matplotlib
matplotlib.use('webagg')
from matplotlib import pyplot as plt
import numpy as np
print 'numpy:', np.__version__
print 'MPL:', matplotlib.__version__
plt.figure()
plt.plot([0,1,0.5,2,1,3])
plt.show() The versions reported are:
I built matplotlib using that numpy version without issues on Ubuntu 14.10 with Python 2.7.8. |
I've tracked down where the floats are coming from: https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/backend_webagg_core.py#L251 The bbox object stores its data as numpy floats. I'll update the PR shortly. |
Great. Thanks for tracking this down. |
BUG: recent numpy fails on non-int shape
BUG: recent numpy fails on non-int shape
Backported to v1.5.x as 921aa41 |
With the current numpy master branch, the WebAgg backend fails during the
draw()
methodThis patch remedies the problem, though not at its source. It might be useful to track down what causes the width and height to be float64 in the first place.