[Numpy-tickets] [NumPy] #494: Arrays of type float96 or float128 do not display correctly
NumPy
numpy-tickets@scipy....
Thu Apr 5 17:33:35 CDT 2007
#494: Arrays of type float96 or float128 do not display correctly
------------------------+---------------------------------------------------
Reporter: socha | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 1.0.2 Release
Component: numpy.core | Version: none
Severity: normal | Keywords: float96 float128
------------------------+---------------------------------------------------
Here is an example:
{{{
C:\Documents and Settings\socha>python
Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug 2 2006, 12:09:59) [MSC
v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.__version__
'1.0.2'
>>> from numpy import array
>>> f = array([1,2,3], dtype='float96')
>>> f
array([0.0, 0.0, -2.0], dtype=float96) <== float96 prints
incorrectly
>>> f.astype('float32')
array([ 1., 2., 3.], dtype=float32) <== Yet data seems
intact
>>> f.sum()
-2.0 <== prints incorrectly
>>> f.sum().astype('float32')
6.0 <== prints correctly if
force to float32
>>>
}}}
We have the same symptoms with float128 (on a Mac with an Intel 2GHz Core
Duo).
- David Socha & Daniel Terhorst, UrbanSim Project, http://www.urbansim.org
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/494>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list