summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorEric Jones <eric@enthought.com>2007-04-11 02:05:06 +0000
committerEric Jones <eric@enthought.com>2007-04-11 02:05:06 +0000
commit98ab993945def2a5ad44e3f8d5d65c57c449ba28 (patch)
tree77b3559ddd09f645e23232c80e0557ca1f9b53c8 /numpy/lib/function_base.py
parente50171fa5073425a1537c081eefd200b0cf1e4d2 (diff)
downloadnumpy-98ab993945def2a5ad44e3f8d5d65c57c449ba28.tar.gz
fixed a typecode Float->float issue in average.
This is not pretty code it seems overly complicated, and it has an "eval" statement in it where it builds a string and evaluates it. I can't imagine this is the best approach to this -- but I also am not going to spend the time to examine it right now.
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 e35f8a00f..2bec7c081 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -306,7 +306,7 @@ def average(a, axis=None, weights=None, returned=False):
ni = ash[axis]
r = [newaxis]*ni
r[axis] = slice(None, None, 1)
- w1 = eval("w["+repr(tuple(r))+"]*ones(ash, Float)")
+ w1 = eval("w["+repr(tuple(r))+"]*ones(ash, float)")
n = add.reduce(a*w1, axis)
d = add.reduce(w1, axis)
else: