diff options
author | Alan McIntyre <alan.mcintyre@local> | 2008-09-13 18:10:48 +0000 |
---|---|---|
committer | Alan McIntyre <alan.mcintyre@local> | 2008-09-13 18:10:48 +0000 |
commit | 83eba775c46704a969826eb1990be80e35c65255 (patch) | |
tree | b7462dcedf8c6c99c713ad096334a081df776970 /numpy/oldnumeric/mlab.py | |
parent | e8b5097f886ca58ff5713886f8378d2b233c418b (diff) | |
download | numpy-83eba775c46704a969826eb1990be80e35c65255.tar.gz |
Rewrapped __all__ definition to conform to PEP8.
Standardize NumPy import as "import numpy as np".
Removed unused imports.
Fixed undefined reference to ndarray (should be np.ndarray).
Fixed undefined references to exp (should be math.exp).
Diffstat (limited to 'numpy/oldnumeric/mlab.py')
-rw-r--r-- | numpy/oldnumeric/mlab.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/numpy/oldnumeric/mlab.py b/numpy/oldnumeric/mlab.py index 47be89e1b..c11e34c1f 100644 --- a/numpy/oldnumeric/mlab.py +++ b/numpy/oldnumeric/mlab.py @@ -1,6 +1,10 @@ # This module is for compatibility only. All functions are defined elsewhere. -__all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'RandomArray', 'prod', 'std', 'hamming', 'flipud', 'max', 'blackman', 'corrcoef', 'bartlett', 'eye', 'squeeze', 'sinc', 'tri', 'cov', 'svd', 'min', 'median', 'fliplr', 'eig', 'mean'] +__all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', + 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', + 'LinearAlgebra', 'RandomArray', 'prod', 'std', 'hamming', 'flipud', + 'max', 'blackman', 'corrcoef', 'bartlett', 'eye', 'squeeze', 'sinc', + 'tri', 'cov', 'svd', 'min', 'median', 'fliplr', 'eig', 'mean'] import numpy.oldnumeric.linear_algebra as LinearAlgebra import numpy.oldnumeric.random_array as RandomArray @@ -12,7 +16,7 @@ from numpy import tril, trapz as _Ntrapz, hanning, rot90, triu, diff, \ from numpy.linalg import eig, svd from numpy.random import rand, randn -import numpy as nn +import numpy as np from typeconv import convtypecode @@ -22,7 +26,7 @@ def eye(N, M=None, k=0, typecode=None, dtype=None): """ dtype = convtypecode(typecode, dtype) if M is None: M = N - m = nn.equal(nn.subtract.outer(nn.arange(N), nn.arange(M)),-k) + m = np.equal(np.subtract.outer(np.arange(N), np.arange(M)),-k) if m.dtype != dtype: return m.astype(dtype) @@ -32,7 +36,7 @@ def tri(N, M=None, k=0, typecode=None, dtype=None): """ dtype = convtypecode(typecode, dtype) if M is None: M = N - m = nn.greater_equal(nn.subtract.outer(nn.arange(N), nn.arange(M)),-k) + m = np.greater_equal(np.subtract.outer(np.arange(N), np.arange(M)),-k) if m.dtype != dtype: return m.astype(dtype) |