On 2006-05-03, Andy McDonagh <[EMAIL PROTECTED]> wrote: > Dear python experts, > > I am new to python and this site, so I apologize if this is off topic (i.e. > is it a SciPy question?). I will try to demonstrate my problem below: > -------------------------------------------------------- > #!/usr/local/bin/python > > from scipy import * > from scipy.stats import * > a=norm(loc=0,scale=1) > a_data = a.rvs(10) > > problem = zeros(10) > print problem > > h_x1_x2 = -sum(problem * log2(a_data)) > > print h_x1_x2 > #NaN > ---------------------------------------------------------- > > I need a way of handling NaNs
NaNs are handled. Apparently they aren't handled the way you want them to be? > for example R has the 'na.omit' option. Does anybody know if > this exists? It would help if you explain how you want NaNs handled, but I don't recall that tehre are any "options" for handling NaNs other than the default way in scipy. -- Grant Edwards grante Yow! It's NO USE... I've at gone to "CLUB MED"!! visi.com -- http://mail.python.org/mailman/listinfo/python-list