[SciPy-user] Selecting Array Indicies with an array of values?!?

Robert Kern robert.kern@gmail....
Thu Jan 8 19:49:26 CST 2009


On Thu, Jan 8, 2009 at 19:29, Kevin Webster <chuck.l.norris@gmail.com> wrote:
> Hello,
>
>  I am rather new to numpy and scipy so some of this may come from my ignorance,
> but I am having an issue with using numpy to edit a large array of values. I
> want to selectively edit items in an array with a list of those items. Some code
> might explain better:
>
> arrSV[usr_mov_ids[a[i]:a[i+1]]] =
> ((abs(SV1)-abs(arrSV[usr_mov_ids[a[i]:a[i+1]]])).clip(min=-1,max=1)

Can you give us a small, self-contained, complete example that
demonstrates the problem?

-- 
Robert Kern

"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 SciPy-user mailing list