On 8/20/07, mark <[EMAIL PROTECTED]> wrote:
> b = a>5
>
> a[not b] or a[!b] don't work. So it's gotta be something different.
a[~b]
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Hello - I am wondering what the better way is to select part of an
array.
Say I have an array a:
a = arange(10)
Now I want to select the values larger than 5
a[ a>5 ]
and later I need the values smaller or equal to 5
a[ a<=5 ]
It seems that doing the comparison twice is extra work (especiall