[NumPy-Tickets] [NumPy] #1570: IndexError: index (%Ld) out of range (0<=index<%Ld) in dimension %d
NumPy Trac
numpy-tickets@scipy....
Mon Aug 2 17:54:38 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: |
------------------------+---------------------------------------------------
Using numpy 1.4.1 or 1.5b1, built with msvc9 for win-amd64:
{{{
>>> a = np.arange(10)
>>> a.shape = 2, 5
>>> a[1, 10]
Traceback (most recent call last):
File "<input>", line 1, in <module>
IndexError: index (%Ld) out of range (0<=index<%Ld) in dimension %d
}}}
The error message should be
{{{
IndexError: index (10) out of range (0<=index<5) in dimension 1
}}}
The attached patch uses '%lld' instead of '%Ld' as an int64 format
specifier. This currently works only on Python 2.7 since '%lld' is only
processed starting with Python 2.7 (see http://bugs.python.org/issue7228).
No additional tests fail with this patch applied.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1570>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list