[Numpy-discussion] problems with index arrays and byte order
Christopher Hanley
chanley at stsci.edu
Mon May 8 13:50:01 EDT 2006
Greetings,
The following example was uncovered by a pyfits user during testing. It
appears that there is a significant problem with index array handling
byte order properly.
Example:
>>> import numpy
>>> a = numpy.array([1,2,3,4,5,6],'>f8')
>>> a[3:5]
array([ 4., 5.])
>>> a[[3,4]]
array([ 2.05531309e-320, 2.56123631e-320])
>>> a[numpy.array([3,4])]
array([ 2.05531309e-320, 2.56123631e-320])
>>> numpy.__version__
'0.9.7.2477'
This test was conducted on a Red Hat Enterprise system.
Chris
More information about the NumPy-Discussion
mailing list