[Numpy-discussion] average of array containing NaN

Robert Kern robert.kern@gmail....
Mon Jun 25 13:25:50 CDT 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