clean way prepend an element to a numpy array
robert.kern at gmail.com
Wed Jul 22 21:45:41 CEST 2009
On 2009-07-22 01:51, greg wrote:
> bdb112 wrote:
>> I saw this interest syntax on this site
>> I guess that is cute, but could be confusing....(and doesn't work)
> It does if you use an array of the appropriate
> type on the right hand side:
> a[:0] = array('i', )
Not when 'a' is a numpy array rather than an array.array.
"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