[Scipy-tickets] [SciPy] #1243: netcdf tests fail with Python 2.4

SciPy Trac scipy-tickets@scipy....
Wed Jul 21 10:08:07 CDT 2010


#1243: netcdf tests fail with Python 2.4
----------------------+-----------------------------------------------------
 Reporter:  bsouthey  |       Owner:  somebody
     Type:  defect    |      Status:  new     
 Priority:  normal    |   Milestone:  0.8.0   
Component:  scipy.io  |     Version:  devel   
 Keywords:            |  
----------------------+-----------------------------------------------------

Comment(by bsouthey):

 This is a problem that Python 2.4 does not treat numpy integers as Python
 integers except for numpy's int64

 >>> import numpy as np
 >>> alist=['1','4','6']
 >>> alist[np.int64(0)]
 '1'
 >>> alist[np.int32(0)]
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
 TypeError: list indices must be integers
 >>> alist[np.int8(0)]
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
 TypeError: list indices must be integers
 >>> alist[np.int16(0)]
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
 TypeError: list indices must be integers

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1243#comment:1>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list