[Numpy-tickets] [NumPy] #328: numpy.insert() won't insert at the end of an array

NumPy numpy-tickets at scipy.net
Sat Oct 7 06:13:25 CDT 2006


#328: numpy.insert() won't insert at the end of an array
------------------------+---------------------------------------------------
 Reporter:  vomjom      |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:          
Component:  numpy.core  |     Version:          
 Severity:  normal      |    Keywords:          
------------------------+---------------------------------------------------
 Here's a log:
 >>> import numpy
 >>> a = numpy.array([1,2,4])
 >>> numpy.insert(a, 3, 5)
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/usr/lib/python2.4/site-packages/numpy/lib/function_base.py", line
 1290, in insert
     raise ValueError, "index (%d) out of range (0<=index<=%d) "\
 ValueError: index (3) out of range (0<=index<=3) in dimension 0

 3 certainly is within that range :)

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/328>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list