[Numpy-discussion] why does b[:-0] not work, and is there an elegant solution?

Mark Bakker markbak at gmail.com
Wed Aug 19 08:25:50 EDT 2009


Hello list,

I compute the index of the last term in an array that I need and call the
index n.

I can then call the array b as

b[:-n]

If I need all terms in the array, the logical syntax would be:

b[:-0]

but that doesn't work. Any reason why that has not been implemented? Any
elegant workaround?

Thanks, Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090819/b95f5cba/attachment.html>


More information about the NumPy-Discussion mailing list