[Numpy-discussion] Numpy arrays and slicing comprehension issue

Daπid davidmenhur at gmail.com
Sat Jul 8 08:13:23 EDT 2017

On 8 July 2017 at 13:03, Jaime Fernández del Río <jaime.frio at gmail.com>

> The last index is exclusive:
> [a:b] means a <= index < b.

And the consequence is that the length of your array is b - a, so [:3]
gives you the first 3 values.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20170708/0a796145/attachment.html>

More information about the NumPy-Discussion mailing list