[Numpy-discussion] Compound conditional indexing

Gökhan Sever gokhansever@gmail....
Wed Sep 30 13:27:20 CDT 2009


Hello,

How to conditionally index an array as shown below :

a = arange(10)
a[5<a<8]

to get
array([6,7])

I can't do this with where either.

What is the cure for this?

Thanks.

-- 
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090930/598b3873/attachment.html 


More information about the NumPy-Discussion mailing list