summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric/mlab.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2007-05-04 04:08:15 +0000
committerTravis Oliphant <oliphant@enthought.com>2007-05-04 04:08:15 +0000
commit5b270e2f541c763012e0acd4fa5e23933029b9db (patch)
tree3ddba43e4b5bc3efd33cef477b0a4ed83d822f0b /numpy/oldnumeric/mlab.py
parent7a837ba50fdddfe4508e61cb35bbac9b35886cc8 (diff)
downloadnumpy-5b270e2f541c763012e0acd4fa5e23933029b9db.tar.gz
Fix compatibility layer definition of std
Diffstat (limited to 'numpy/oldnumeric/mlab.py')
-rw-r--r--numpy/oldnumeric/mlab.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/oldnumeric/mlab.py b/numpy/oldnumeric/mlab.py
index c3e125fe3..47be89e1b 100644
--- a/numpy/oldnumeric/mlab.py
+++ b/numpy/oldnumeric/mlab.py
@@ -55,7 +55,8 @@ def prod(x, axis=0):
return _Nprod(x, axis)
def std(x, axis=0):
- return _Nstd(x, axis)
+ N = asarray(x).shape[axis]
+ return _Nstd(x, axis)*sqrt(N/(N-1.))
def mean(x, axis=0):
return _Nmean(x, axis)