[Numpy-discussion] Re: Unexpected change of array used to index another array

Robert Kern robert.kern at gmail.com
Sat Apr 8 21:17:28 CDT 2006


Webb Sprague wrote:
> Hi.
> 
> I indexed an 10 x 10(called bigM below) with another array (OFFS_TMP
> below).  I suppose because OFFS_TMP has negative numbers, it was
> changed to cycle around to 9 wherever there is a negative 1 (which is
> the forward version of -1 if you are a 10 x 10 matrix).  You can
> analogous behavior with -2 => 8, etc.  Is changing the indexing matrix
> really the correct behavior?  The result of using the index seems to
> be fine.  Has this story been told already and I didn't know it?

I think it's a bug. I've located the problem, but I'm not familiar with that
part of the code so I'm not entirely sure how to go about fixing it.

http://projects.scipy.org/scipy/numpy/ticket/49

-- 
Robert Kern
robert.kern at gmail.com

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco





More information about the Numpy-discussion mailing list