20/08/09 @ 18:00 (-0700), thus spake Dr. Phillip M. Feldman: > I have a 1-D array and would like to generate a list of indices for which a > given condition is satisfied. What is the cleanest way to do this?
you can do something like this: numpy.arange(len(x))[x > 5] it'll give you the indices of x where x is > 5. Ernest _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion