[NumPy-Tickets] [NumPy] #1570: IndexError: index (%Ld) out of range (0<=index<%Ld) in dimension %d

NumPy Trac numpy-tickets@scipy....
Thu Aug 12 11:09:47 CDT 2010


#1570: IndexError: index (%Ld) out of range (0<=index<%Ld) in dimension %d
------------------------+---------------------------------------------------
 Reporter:  cgohlke     |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:  1.5.0   
Component:  numpy.core  |     Version:          
 Keywords:              |  
------------------------+---------------------------------------------------

Comment(by cgohlke):

 Good question. The patch only affects msvc builds for win-amd64,
 practically only Python 2.6, 2.7 and 3.1+. '%Ld' is clearly the wrong
 format specifier for these platforms and will never work. At least '%lld'
 will work correctly on Python 2.7 and >=3.2. Unless I am missing
 something, fixing this for Python 2.6 and 3.1 would require special casing
 all PyErr_Format calls that deal with 64 bit integers. I counted 41
 occurrences of INTP_FMT in the numpy code.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1570#comment:2>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list