[Numpy-discussion] bug in pyfits w/ numarray 1.2

Stephen Walton stephen.walton at csun.edu
Wed Mar 2 09:26:27 CST 2005


Sebastian Haase wrote:

>Hi,
>After upgrading to the latest numarray we get this error from pyfits:
>  
>
>>>>a = U.loadFits(fn)
>>>>        
>>>>
>Traceback (most recent call last):
>  File "<input>", line 1, in ?
>  File "/jws30/haase/PrLin/Priithon/useful.py", line 1069, in loadFits
>    return ff[ slot ].data
>
Are you sure the value of 'slot' and 'ff' in your code are correct.  
pyfits 0.9.3 and numarray 1.2.2 seem to work fine for me:

In [5]: f=pyfits.open(file)

In [6]: v=f[0].data

In [7]: v?
Type:           NumArray
Base Class:     <class 'numarray.numarraycore.NumArray'>
String Form:
[[ 221  171   67 ...,  112 -136   12]
            [ 125   78  159 ...,  249 -345 -260]
            [ 346   47  250 ..., <...> ...,  206 -106 -127]
            [ 187   16  218 ...,  342 -243  -59]
            [ 156  200  279 ...,  138 -209 -230]]
Namespace:      Interactive
Length:         1024
Docstring:
    Fundamental Numeric Array

    type       The type of each data element, e.g. Int32
    byteorder  The actual ordering of bytes in buffer: "big" or "little".


In [8]: pyfits.__version__
Out[8]: '0.9.3 (June 30, 2004)'

In [9]: numarray.__version__
Out[9]: '1.2.2'





More information about the Numpy-discussion mailing list