[Numpy-discussion] average of array containing NaN

Robert Kern robert.kern at gmail.com
Mon Jun 25 14:25:50 EDT 2007


Giorgio F. Gilestro wrote:
> Thanks.
> Actually those I care the most are average and std.
> Is there a way to know the number of NaN in an array?

isnan(a).sum()

-- 
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



More information about the NumPy-Discussion mailing list