[SciPy-user] Looking for function that returns indicies acc'd to condition

Gary Pajer pajer at iname.com
Tue Dec 16 17:26:50 CST 2003


This function must exist in Numeric or scipy, but I can't find it.

Given an array, return an array (or list) of indicies corresponding to
elements that satisfy a condition.

I.e.,
a = array((1,2,3,4,5))
find_index(a>3)

returns [3,4]

tia,
gary



More information about the SciPy-user mailing list