clean way prepend an element to a numpy array

Robert Kern robert.kern at gmail.com
Fri Jul 24 19:35:01 EDT 2009


On 2009-07-24 18:26, greg wrote:
> Robert Kern wrote:
>
>>> a[:0] = array('i', [0])
>>
>> Not when 'a' is a numpy array rather than an array.array.
>
> That's true, but I got the impression that the OP was
> talking about array.array, not numpy.array.

Did you read the Subject: line? :-)

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list