[Numpy-discussion] Negative indexing.
Charles R Harris
charlesr.harris@gmail....
Mon Jan 16 15:24:08 CST 2012
On Sat, Jan 14, 2012 at 4:53 PM, Nathan Faggian <nathan.faggian@gmail.com>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.
>
>
Looks right to me, the whole last column is 1000. What exactly do you want
to do and what is the problem?
<snip>
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120116/0783c008/attachment.html
More information about the NumPy-Discussion
mailing list