Re: [Numpy-discussion] Negative indexing.

2012-01-16 Thread Benjamin Root
On Sun, Jan 15, 2012 at 6:54 AM, David Cournapeau courn...@gmail.comwrote: On Sat, Jan 14, 2012 at 11:53 PM, Nathan Faggian nathan.fagg...@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

Re: [Numpy-discussion] Negative indexing.

2012-01-16 Thread Charles R Harris
On Sat, Jan 14, 2012 at 4:53 PM, Nathan Faggian nathan.fagg...@gmail.comwrote: 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

Re: [Numpy-discussion] Negative indexing.

2012-01-16 Thread Benjamin Root
On Mon, Jan 16, 2012 at 3:24 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sat, Jan 14, 2012 at 4:53 PM, Nathan Faggian nathan.fagg...@gmail.comwrote: Hi, I am finding it less than useful to have the negative index wrapping on nd-arrays. Here is a short example: import

Re: [Numpy-discussion] Negative indexing.

2012-01-16 Thread Benjamin Root
On Mon, Jan 16, 2012 at 3:30 PM, Benjamin Root ben.r...@ou.edu wrote: On Mon, Jan 16, 2012 at 3:24 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sat, Jan 14, 2012 at 4:53 PM, Nathan Faggian nathan.fagg...@gmail.com wrote: Hi, I am finding it less than useful to have the

Re: [Numpy-discussion] Negative indexing.

2012-01-16 Thread Nathan Faggian
Hi, I am sorry for the late reply. Benjamin has hit the nail on the head. I guess I am seeing numpy fancy indexing as equivalent to integer based coordinate sampling and trying to compare numpy's fancy indexing to something like map_coordinates in scipy. I have never used np.ravel_multi_index()

Re: [Numpy-discussion] Negative indexing.

2012-01-15 Thread Daniele Nicolodi
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

Re: [Numpy-discussion] Negative indexing.

2012-01-15 Thread David Cournapeau
On Sat, Jan 14, 2012 at 11:53 PM, Nathan Faggian nathan.fagg...@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

[Numpy-discussion] Negative indexing.

2012-01-14 Thread Nathan Faggian
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 I am after is a way to say please don't wrap