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
AttributeError with big float Value(s) #1828
Comments
I can't reproduce this on my RHELinux 64bit machine with python2.7, mpl 1.3.x, tkagg backend, and numpy 1.6. Can you provide some details about your setup? Have you got python2.7 to give this a go on? Cheers, |
I am using mpl 1.3.x (tested with 1.2.0 too) with tkagg backend, numpy 1.7 (but the string matplotlib.version__numpy indicate 1.4, numpy.version gives me 1.7), python 3.3, ipython 0.13.1 cheers, EDIT: tested on python2.7 with mpl 1.3.X, tkagg backend and numpy 1.6.1, and it's working. This bug seems to be specific to python 3.3. |
On Mon, Mar 18, 2013 at 6:14 AM, GuillaumePlum notifications@github.comwrote:
|
I can't reproduce this on OS X 10.8 64 bit with python 2.7, mpl 1.2.x, gtkagg backend and numpy 1.6.2. |
Like I've said above, this bug seems to be specific to python 3. I've tested it on different configuration using python3.2 and python3.3 with mpl 1.2.X and 1.3.x (git version), using different Linux distribution (ArchLinux, Debian, Ubuntu), in case of I've broke something. But when using python2.7, it's all working... It's a little weird. Adding print to every variable used in those functions (set_format and round) seems useless, they're printing the same thing. (Sorry for the english!) |
I have the same issue: I cannot plot a number > 8.9999E+19 /usr/local/lib/python3.3/site-packages/numpy/core/fromnumeric.py in round_(a=array([0.0, 0.2, 0.4, 0.6, 0.8, 1.0], dtype=object), decimals=3, out=None) |
Strange -- I can't reproduce on Python 3.3, Numpy 1.7.1, matplotlib 1.2.x branch on Linux (Fedora 18). Any chance you can run this in pdb and print the value of "decimals" in the innermost stack frame? |
Just before the exception in the round_ function, i have: a = [0.0 0.5 1.0 1.5 2.0]
decimals = 3
out = None Using the code give in the first post. |
…causes a crash. Adds a test.
It's not an overflow, but current numpy 1.7.1 does not like to convert huge integers that python 3.3 produces into np data types. Instead, it saves them as an object (dtype=object, the object type is builtins.int). Not sure this is a feature or a bug (of numpy). Probably a feature - someone must have thought that would be clever. Instead of producing an overflow. In [1]: np.array([10**25]) In [2]: x = np.array([10**25]) AttributeError Traceback (most recent call last) AttributeError: 'int' object has no attribute 'dtype' In [4]: type(x[0]) In [5]: np.array([10**5]) In [7]: x = np.array([10**5]) In [8]: type(x[0]) |
Fixed by #1991. |
When I use some important value in my plot, i get the error :
Here is a little piece of code which reproduces the error :
The text was updated successfully, but these errors were encountered: