Cannot Use 128bit Float In Python On 64bit Architecture
Solution 1:
Update: From the comments, it seems pointless to even have a 128 bit float on a 64 bit system.
I am using anaconda
on a 64-bit Ubuntu 14.04 system with
sys.version_info(major=2, minor=7, micro=9, releaselevel='final', serial=0)
and 128 bit floats work fine:
importnumpya= numpy.float128(3)
This might be an distribution problem. Try:
- Install Anaconda
- Update canopy
- Check that the version of python in the path is the one supplied by anaconda or canopy
EDIT: Update from the comments:
Not my downvote, but this post doesn't really answer the "why doesn't np.float128 exist on my machine" implied question. The true answer is that this is platform specific: float128 exists on some platforms but not others, and on those platforms where it does exist it's almost certainly simply the 80-bit x87 extended precision type, padded to 128 bits. – Mark Dickinson
Solution 2:
For me, the issue was a Python module that has a problem in Windows (PyOpenGL for those that care). This site has Python wheels with "fixed" versions of many popular modules, to address the float128 issue.
Note: This question has an accepted answer. My answer if for future searchers, since this question is high in Google results for module 'numpy' has no attribute 'float128'
.
Post a Comment for "Cannot Use 128bit Float In Python On 64bit Architecture"