Lionel Roubeyrie wrote: > good news, and thanks for your last comment. However, using nans give some > errors with scipy.stats: > lionel52>t=array([1,2,nan,4]) > > lionel53>stats.nanmean(t) > --------------------------------------------------------------------------- > exceptions.NameError Traceback (most recent > call last) > > /home/lionel/<ipython console> > > /usr/lib/python2.4/site-packages/scipy/stats/stats.py in nanmean(x, axis) > 258 > 259 # XXX: this line is quite clearly wrong > --> 260 n = N-sum(isnan(x),axis) > 261 putmask(x,isnan(x),0) > 262 return stats.mean(x,axis)/factor > > NameError: global name 'N' is not defined
It's a bug in nanmean() as the comment immediately preceding it mentions. I don't know who put it in, but I noticed it and couldn't figure out what it intended to do (or didn't have to time to try). <Looks at svn blame and svn log> Ah, it's Travis's fault. So he can fix it. :-) -- 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 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion