[SciPy-Dev] scipy.stats.signaltonoise docstring

David Goldsmith d.l.goldsmith@gmail....
Tue Jun 15 00:47:44 CDT 2010

Hi, folks!  The docstring for scipy.stats.stats.signaltonoise says that if
axis == None, the input is first ravel'd, but I see no code that does this;
here's the code:

def signaltonoise(a, axis=0, ddof=0):
    a = np.asanyarray(a)
    m = a.mean(axis)
    sd = a.std(axis=axis, ddof=ddof)
    return np.where(sd == 0, 0, m/sd)

Even though it's not surrounded by an "if axis is None:", I checked the
docstring for asanyarray anyway, and there's nothing there about
raveling.  So, what gives?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20100614/5908c90e/attachment.html 

More information about the SciPy-Dev mailing list