summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2008-02-23 01:14:40 +0000
committerTravis Oliphant <oliphant@enthought.com>2008-02-23 01:14:40 +0000
commit1cc67dd9c8a9c65e511b6a363915688378ba7938 (patch)
treee7092bf3fae38d9ba615eae35a94496095395ede /numpy/lib/function_base.py
parent6cd2d6d0776b40f9753c5017bd49f01846d5a325 (diff)
downloadnumpy-1cc67dd9c8a9c65e511b6a363915688378ba7938.tar.gz
Fix bug reported by Debian package maintainer.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 4af867233..c3cce05ed 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -375,7 +375,7 @@ def average(a, axis=None, weights=None, returned=False):
n = add.reduce(a*w, axis)
d = add.reduce(w, axis)
elif wsh == (ash[axis],):
- ni = ash[axis]
+ ni = len(ash)
r = [newaxis]*ni
r[axis] = slice(None, None, 1)
w1 = eval("w["+repr(tuple(r))+"]*ones(ash, float)")