On Jul 21, 2:13 pm, Ben Finney <ben+pyt...@benfinney.id.au> wrote:
> bdb112 <boyd.blackw...@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
> <URL:http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html>.
>

Yes, I had had a look through that - nothing there that allows writing
a succint
clear statement (except for my .resize example in the original post),
although if efficiency was
a concern, then maybe resize and shift right, but that would really
obscure the code.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to