From: Lionel R. <lro...@li...> - 2006-09-22 07:35:17
|
Le jeudi 21 septembre 2006 19:01, Travis Oliphant a =E9crit=A0: > Lionel Roubeyrie wrote: > > find any solution for that. I have tried with arrays of dtype=3Dobject,= but > > I have problem when I want to compute min, max, ... with an error like: > > TypeError: function not supported for these types, and can't coerce > > safely to supported types. > > I just added support for min and max methods of object arrays, by adding > support for Object arrays to the minimum and maximum functions. > > -Travis Hello travis, good news, and thanks for your last comment. However, using nans give some= =20 errors with scipy.stats: lionel52>t=3Darray([1,2,nan,4]) lionel53>stats.nanmean(t) =2D------------------------------------------------------------------------= =2D- exceptions.NameError Traceback (most recent= =20 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 =2D-> 260 n =3D 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 > > > ------------------------------------------------------------------------- > 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion =2D-=20 Lionel Roubeyrie - lro...@li... LIMAIR http://www.limair.asso.fr |