[Numpy-discussion] simple slicing question

mark markbak at gmail.com
Wed Aug 8 07:07:15 EDT 2007


Life is so simple.
Thanks Keith,
Mark

On Aug 8, 12:53 pm, "Keith Goodman" <kwgood... at gmail.com> wrote:
> On 8/8/07, mark <mark... at 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... at scipy.orghttp://projects.scipy.org/mailman/listinfo/numpy-discussion




More information about the NumPy-Discussion mailing list