Re: [Numpy-discussion] behavior of 'insert' for inserting multiple values

2008-05-30 Thread Travis E. Oliphant
mark wrote: > I think this is a special case that was overlooked. > It works if there are multiple positions but only one value: > a = arange(5) insert(a,[3,3],4) > array([0, 1, 2, 4, 4, 3, 4]) > > But not when you give one position with mutiple values: > insert(a

Re: [Numpy-discussion] behavior of 'insert' for inserting multiple values

2008-05-30 Thread mark
I think this is a special case that was overlooked. It works if there are multiple positions but only one value: >>> a = arange(5) >>> insert(a,[3,3],4) array([0, 1, 2, 4, 4, 3, 4]) But not when you give one position with mutiple values: >>> insert(a,3,[7,7]) array([0, 1, 2, 7, 3, 4]) It would be