[Python-ideas] Where did we go wrong with negative stride?

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Oct 29 06:07:53 CET 2013


Ron Adam wrote:
> If the left and right indices are to be considered separate from the 
> step, we can use this existing legal syntax, and just pass the step 
> after a comma.
> 
>     a[i:j, k]

No, we can't do that, because NumPy uses that for indexing
into a 2-dimensional array.

-- 
Greg


More information about the Python-ideas mailing list