On Thu, Aug 20, 2009 at 18:00, Dr. Phillip M. Feldman<pfeld...@verizon.net> wrote: > > 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?
numpy.nonzero(condition)[0] -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion