[Numpy-discussion] Compound conditional indexing

Gökhan Sever gokhansever at gmail.com
Wed Sep 30 14:27:20 EDT 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.python.org/pipermail/numpy-discussion/attachments/20090930/598b3873/attachment.html>


More information about the NumPy-Discussion mailing list