I have a numpy array, records, with named fields including a field named
"integer_field". I have an array (or list) of values of interest, and I want to
get the indexes where integer_field has any of those values.
Because I can do
indexes = np.where( records.integer_field > 5 )
I thought I could do
indexes = np.where( records.integer_field in values )
But that doesn't work. (As a side question I'm interested in why that doesn't
work, when values is a python list.)
How can I get those indexes? I though perhaps I need a nested np.where, or some
other two-step process, but it wasn't clear to me how to do it.
Thanks.
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion