A mean docstring?

Sasha ndarray at mac.com
Tue Oct 10 16:13:55 CDT 2006

On 10/10/06, Fernando Perez <fperez.net at gmail.com> wrote:
> ...
> 1. Should the docstring be changed to simply say
>     If axis is None, this equals:
>         a.sum(axis, dtype) * 1.0 / a.size

I would think so. In addition, at the expense of being slightly
inaccurate, I would change that to simply a.sum(axis, dtype)/a.size .
This will only be inaccurate if dtype is integer and true division is
not enabled.  If you want to be pedantic, a.sum(axis,
dtype)/float(a.size) would still read better.

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

More information about the Numpy-discussion mailing list