On Tue, Aug 4, 2009 at 14:29, Pierre GM<[email protected]> wrote: > > On Aug 4, 2009, at 2:43 PM, Robert Kern wrote: > >> On Tue, Aug 4, 2009 at 13:40, Gökhan Sever<[email protected]> >> wrote: >>> This is the loveliest of all solutions: >>> >>> c[isfinite(c)].mean() >> >> I kind of like c[c == c].mean(), but only because it's a bit mind- >> blowing. :-) > > But it doesn't give the same result as the previous one when there's > an inf...
NaNs might be markers of missing data, but I see infs as data. -- 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 [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
