[Numpy-discussion] yet another trivial question

Neal Becker ndbecker2@gmail....
Fri Nov 2 09:18:32 CDT 2012


I'm trying to convert some matlab code.  I see this:

b(1)=[];

AFAICT, this removes the first element of the array, shifting the others.

What is the preferred numpy equivalent?

I'm not sure if

b[:] = b[1:]

is safe or not



More information about the NumPy-Discussion mailing list