[Numpy-discussion] deleting value from array

mark markbak at gmail.com
Wed Aug 15 06:11:59 EDT 2007


Yeah, I can see the copying is essential.
I just think the syntax
a = delete(a,1)
confusing, as I would expect the deleted value back, rather than the
updated array.
As in the 'pop' function for lists.
No 'pop' in numpy? (I presume this may have been debated extensively
in the past).
I find the syntax
a.delete(1) more logical.
Mark

On Aug 15, 11:19 am, "Matthieu Brucher" <matthieu.bruc... at gmail.com>
wrote:
> > I now get the feeling the delete command needs to copy the entire
> > array with exception of the deleted item. I guess this is a hard thing
> > to do efficiently?
>
> Well, if you don't copy the array, the value will always remain present.
>
> Matthieu
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discuss... at scipy.orghttp://projects.scipy.org/mailman/listinfo/numpy-discussion




More information about the NumPy-Discussion mailing list