diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-08-28 20:01:34 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-08-28 20:01:34 +0000 |
commit | 527937eb3df319c23a9ccfe26558739acec14e8c (patch) | |
tree | 7f5ac82ac44d4023df0903ed97f858629d6bb1fa /numpy | |
parent | 0f23250d0f7f84f1c69ccd85d13338714343d4c1 (diff) | |
download | numpy-527937eb3df319c23a9ccfe26558739acec14e8c.tar.gz |
Fix sundry errors.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/fromnumeric.py | 1 | ||||
-rw-r--r-- | numpy/core/numeric.py | 4 | ||||
-rw-r--r-- | numpy/lib/function_base.py | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 297ad8b3d..dfe233b6e 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -356,6 +356,7 @@ def sum(x, axis=None, dtype=None, out=None): if out is not None: out[...] = res return out + return res try: sum = x.sum except AttributeError: diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index b89fc0586..34c8b17d0 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -252,7 +252,7 @@ except ImportError: def restoredot(): pass -def tensordot(a, b, axes=(-1,0)) +def tensordot(a, b, axes=(-1,0)): """tensordot returns the product for any (ndim >= 1) arrays. r_{xxx, yyy} = \sum_k a_{xxx,k} b_{k,yyy} where @@ -286,7 +286,7 @@ def tensordot(a, b, axes=(-1,0)) if not equal: raise ValueError, "shape-mismatch for sum" - olda = [ for k in aa if k not in axes_a] + olda = [k for k in aa if k not in axes_a] oldb = [k for k in bs if k not in axes_b] at = a.reshape(nd1, nd2) diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 9df31f463..d8cd30f2c 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1,4 +1,4 @@ -u__all__ = ['logspace', 'linspace', +__all__ = ['logspace', 'linspace', 'select', 'piecewise', 'trim_zeros', 'copy', 'iterable', #'base_repr', 'binary_repr', 'diff', 'gradient', 'angle', 'unwrap', 'sort_complex', 'disp', |