[Numpy-discussion] the mean, var, std of non-arrays
Yaroslav Halchenko
lists at onerussian.com
Thu Jul 18 23:24:42 EDT 2013
On Thu, 18 Jul 2013, Skipper Seabold wrote:
> Not sure anyways if my direct numpy.mean application to pandas DataFrame
> is
> "kosher" -- initially I just assumed that any argument is asanyarray'ed
> first
> -- but I think here catching TypeError for those incompatible .mean's
> would not
> hurt either. �What do you think? �Similar logic applies to mean cousins
> (var,
> std, ...?) decorated around _methods implementations.
> Related? From a while ago.
> [3]https://github.com/numpy/numpy/pull/160
yeah... That is how I thought "it is working", but I guess it was left
without asanyarraying for additional flexibility/performance so any
array-like object could be used, not just ndarray derived classes.
--
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Senior Research Associate, Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik
More information about the NumPy-Discussion
mailing list