[SciPy-Dev] scipy.stats.signaltonoise docstring
David Goldsmith
d.l.goldsmith at gmail.com
Tue Jun 15 01:47:44 EDT 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?
DG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20100614/5908c90e/attachment.html>
More information about the SciPy-Dev
mailing list