clean way prepend an element to a numpy array
ben+python at benfinney.id.au
Tue Jul 21 00:13:55 EDT 2009
bdb112 <boyd.blackwell at gmail.com> writes:
> If I want to add an element at the beginning of an array, it seems
> like I must make a list, insert in place, then make an array again.
The NumPy ‘ndarray’ type (which is what you get by default from the
‘array’ factory function) is a far more complex type than (and is not
derived from) the Python list.
For manipulating them, you'll want to study the NumPy documentation
\ “Are you pondering what I'm pondering?” “I think so, Brain, but |
`\ I don't think Kay Ballard's in the union.” —_Pinky and The |
_o__) Brain_ |
More information about the Python-list