mrafi wrote:
Hey All,
I am working with numpy I have a data set with a lot of nan values, and i want to calculate standard
deviation
is there a direct function to do it for example nansum(or something like
this),
to calculate standard deviation ignoring nan values??

You will want to ask numpy questions on the numpy-discussion mailing list.

  http://www.scipy.org/Mailing_Lists

scipy.stats.nanstd() implements this. Additionally, data[~isnan(data)].std() works unless if you need to apply the std() along just one axis.

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

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to