On 15/01/12 00:53, Nathan Faggian wrote: > Hi, > > I am finding it less than useful to have the negative index wrapping > on nd-arrays. Here is a short example: > > import numpy as np > a = np.zeros((3, 3)) > a[:,2] = 1000 > print a[0,-1] > print a[0,-1] > print a[-1,-1] > > In all cases 1000 is printed out.
What else would you expect? > What I am after is a way to say "please don't wrap around" and have > negative indices behave in a way I choose. I know this is a standard > thing - but is there a way to override that behaviour that doesn't > involve cython or rolling my own resampler? What other behavior would you choose? I don't see any other that would make sense and that would be consistent with positive indexing. Cheers, -- Daniele _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion