Skip to content

AttributeError: module 'numpy' has no attribute 'float128'" #613

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

Closed
hirschbeutel opened this issue Apr 9, 2018 · 6 comments
Closed

AttributeError: module 'numpy' has no attribute 'float128'" #613

hirschbeutel opened this issue Apr 9, 2018 · 6 comments

Comments

@hirschbeutel
Copy link

hirschbeutel commented Apr 9, 2018

WinPython-64bit-3.6.5.0Qt5

python -m pyqtgraph.examples
3DGraphics -> Volumetric -> GLVolumeItem.py:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\WinPython\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-pack
ages\pyqtgraph\opengl\GLViewWidget.py", line 174, in paintGL
self.setProjection(region=region)
File "C:\WinPython\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-pack
ages\pyqtgraph\opengl\GLViewWidget.py", line 97, in setProjection
glMultMatrixf(a.transpose())
File "C:\WinPython\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-pack
ages\OpenGL\latebind.py", line 45, in call
return self._finalCall( *args, **named )
File "C:\WinPython\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-pack
ages\OpenGL\wrapper.py", line 685, in wrapperCall
pyArgs = tuple( calculate_pyArgs( args ))
File "C:\WinPython\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-pack
ages\OpenGL\wrapper.py", line 446, in calculate_pyArgs
yield converter(args[index], self, args)
File "C:\WinPython\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-pack
ages\OpenGL\arrays\arrayhelpers.py", line 112, in asArraySize
handler = typ.getHandler( incoming )
File "C:\WinPython\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-pack
ages\OpenGL\arrays\arraydatatype.py", line 47, in call
handler = handler.load()
File "C:\WinPython\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-pack
ages\OpenGL\plugins.py", line 16, in load
return importByName( self.import_path )
File "C:\WinPython\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-pack
ages\OpenGL\plugins.py", line 38, in importByName
module = import( ".".join(moduleName), {}, {}, moduleName)
File "C:\WinPython\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-pack
ages\OpenGL\arrays\numpymodule.py", line 68, in
class NumpyHandler( formathandler.FormatHandler ):
File "C:\WinPython\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-pack
ages\OpenGL\arrays\numpymodule.py", line 93, in NumpyHandler
numpy.float128,
AttributeError: ("module 'numpy' has no attribute 'float128'", <function asArray
TypeSize..asArraySize at 0x0000000005E4FAE8>)

@stonebig
Copy link
Contributor

stonebig commented Apr 9, 2018

I don't think it's new:

>>> import numpy as z
>>> z.float128(3)
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    z.float128(3)
AttributeError: module 'numpy' has no attribute 'float128'
>>> 

yet was it happening also in previous version ? It's not clear why/where "float128" is asked, and so where is the error.

@hiccup7
Copy link

hiccup7 commented Apr 10, 2018

numpy.float128 isn't supported on Windows using the MS compiler, which is used for NumpyMKL by WinPython. See https://stackoverflow.com/questions/9062562/what-is-the-internal-precision-of-numpy-float128

The problem is caused by either the pyqtgraph or the OpenGL package. Submitting an issue to the appropriate project would solve the problem. One answer on stackoverflow above is to change the reference to numpy.longdouble

@stonebig
Copy link
Contributor

@hirschbeutel create an issue on PyOpengl or PyQtgraph or StackOverflow, as it's not resolvable from WinPython.

@cgohlke
Copy link

cgohlke commented Apr 26, 2018

It's a bug in PyOpenGL. I removed the offending lines and rebuilt ... https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopengl

Sorry, something went wrong.

@stonebig
Copy link
Contributor

it seems https://github.com/mcfletch/pyopengl is less maintained than https://github.com/cprogrammer1994 , but both are sort of mono-maintainer packages.

Sorry, something went wrong.

@Shivdutta
Copy link

Temp Solution for Windows User.
Go to

C:\ProgramData\Anaconda3new\envs\fastai2new\lib\site-packages\fastai2\tabular

open core.py in admin mode

go to line 99

make float 128 to float64 and it will work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants