[Numpy-discussion] question on NumPy NaN
Vasileios Gkinis
v.gkinis@rug...
Tue May 20 11:07:12 CDT 2008
-------- Original Message --------
Subject: question on NumPy NaN
Date: Tue, 20 May 2008 18:03:00 +0200
From: Vasileios Gkinis <v.gkinis@gfy.ku.dk>
To: numpy-discussion@scipy.org
Hi all,
I have a question concerning nan in NumPy.
Lets say i have an array of sample measurements
a = array((2,4,nan))
in NumPy calculating the mean of the elements in array a looks like:
>>> a = array((2,4,nan))
>>> a
array([ 2., 4., NaN])
>>> mean(a)
nan
What if i simply dont want nan to propagate and get something that would
look like:
>>> a = array((2,4,nan))
>>> a
array([ 2., 4., NaN])
>>> mean(a)
3.
Cheers
Vasilis
--
------------------------------------------------------------
Vasileios Gkinis, PhD Student
Centre for Ice and Climate
Niels Bohr Institute
Juliane Maries Vej 30, room 321
DK-2100 Copenhagen
Denmark
Office: +45 35325913
v.gkinis@gfy.ku.dk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080520/f3f984b2/attachment.html
More information about the Numpy-discussion
mailing list