[Numpy-discussion] simple slicing question

mark markbak@gmail....
Wed Aug 8 06:07:15 CDT 2007


Life is so simple.
Thanks Keith,
Mark

On Aug 8, 12:53 pm, "Keith Goodman" <kwgood...@gmail.com> wrote:
> On 8/8/07, mark <mark...@gmail.com> wrote:
>
> > But what if I want to multiply every value between -5 and +5 by 100.
> > This does NOT work:
>
> > d[ d>-5 and d<5 ] *= 100
>
>  d[(d>-5) & (d<5)] *= 100
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discuss...@scipy.orghttp://projects.scipy.org/mailman/listinfo/numpy-discussion



More information about the Numpy-discussion mailing list