diff options
author | Alan McIntyre <alan.mcintyre@local> | 2008-09-13 03:40:57 +0000 |
---|---|---|
committer | Alan McIntyre <alan.mcintyre@local> | 2008-09-13 03:40:57 +0000 |
commit | e091c840e101eb620307747e0e4cd1b939d8abe6 (patch) | |
tree | 378e691843fe1d56e224266b0c8e5478e1327433 /numpy/numarray/functions.py | |
parent | b1e2466272fa0c2ee08701c3d86a03088218b69e (diff) | |
download | numpy-e091c840e101eb620307747e0e4cd1b939d8abe6.tar.gz |
Removed unused/duplicate imports.
Removed repeated members of __all__.
Fixed reference to undefined "out" in functions.py:take function.
Fixed references to undefined "N" in functions.py.
Rewrapped lines to conform to PEP8.
Fixed references to undefined FPE_* constants (from numpy) in util.py.
Diffstat (limited to 'numpy/numarray/functions.py')
-rw-r--r-- | numpy/numarray/functions.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/numpy/numarray/functions.py b/numpy/numarray/functions.py index bd920219b..6a0fd2958 100644 --- a/numpy/numarray/functions.py +++ b/numpy/numarray/functions.py @@ -20,13 +20,13 @@ __all__ += ['vdot', 'dot', 'matrixmultiply', 'ravel', 'indices', 'any', 'argmax', 'argmin', 'argsort', 'around', 'array_equal', 'array_equiv', 'arrayrange', 'array_str', 'array_repr', 'array2list', 'average', 'choose', 'CLIP', 'RAISE', 'WRAP', - 'clip', 'compress', 'concatenate', 'copy', 'copy_reg', + 'clip', 'compress', 'copy', 'copy_reg', 'diagonal', 'divide_remainder', 'e', 'explicit_type', 'pi', 'flush_caches', 'fromfile', 'os', 'sys', 'STRICT', 'SLOPPY', 'WARN', 'EarlyEOFError', 'SizeMismatchError', 'SizeMismatchWarning', 'FileSeekWarning', 'fromstring', 'fromfunction', 'fromlist', 'getShape', 'getTypeObject', - 'identity', 'indices', 'info', 'innerproduct', 'inputarray', + 'identity', 'info', 'innerproduct', 'inputarray', 'isBigEndian', 'kroneckerproduct', 'lexsort', 'math', 'operator', 'outerproduct', 'put', 'putmask', 'rank', 'repeat', 'reshape', 'resize', 'round', 'searchsorted', @@ -45,9 +45,9 @@ import math import operator from numpy import dot as matrixmultiply, dot, vdot, ravel, concatenate, all,\ - allclose, any, around, argsort, array_equal, array_equiv,\ + allclose, any, argsort, array_equal, array_equiv,\ array_str, array_repr, CLIP, RAISE, WRAP, clip, concatenate, \ - diagonal, e, pi, indices, inner as innerproduct, nonzero, \ + diagonal, e, pi, inner as innerproduct, nonzero, \ outer as outerproduct, kron as kroneckerproduct, lexsort, putmask, rank, \ resize, searchsorted, shape, size, sort, swapaxes, trace, transpose import numpy as np @@ -321,7 +321,7 @@ def getTypeObject(sequence, type): if type is not None: return type try: - return typefrom(N.array(sequence)) + return typefrom(np.array(sequence)) except: raise TypeError("Can't determine a reasonable type from sequence") @@ -458,7 +458,7 @@ def take(array, indices, axis=0, outarr=None, clipmode=RAISE): res = work[indices] if outarr is None: return res - out[...] = res + outarr[...] = res return def tensormultiply(a1, a2): @@ -466,9 +466,9 @@ def tensormultiply(a1, a2): if (a1.shape[-1] != a2.shape[0]): raise ValueError("Unmatched dimensions") shape = a1.shape[:-1] + a2.shape[1:] - return np.reshape(dot(N.reshape(a1, (-1, a1.shape[-1])), - np.reshape(a2, (a2.shape[0],-1))), - shape) + return np.reshape(dot(np.reshape(a1, (-1, a1.shape[-1])), + np.reshape(a2, (a2.shape[0],-1))), + shape) def cumsum(a1, axis=0, out=None, type=None, dim=0): return np.asarray(a1).cumsum(axis,dtype=type,out=out) |