diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-06-12 22:58:43 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-06-12 22:58:43 +0000 |
commit | fbf0b479604c22e60215bb28cdedabfb821b9d75 (patch) | |
tree | ff1c02a4a21aec9998b57d7aff01a34573aa21c2 /numpy/lib | |
parent | b5e35c7c5c715d58aca9638e40098d044b8b8dba (diff) | |
download | numpy-fbf0b479604c22e60215bb28cdedabfb821b9d75.tar.gz |
Check-in name-space changes so that numpy.oldnumeric is the compatibility module and numpy does not contain all of the names.
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/convertcode.py | 4 | ||||
-rw-r--r-- | numpy/lib/function_base.py | 6 | ||||
-rw-r--r-- | numpy/lib/machar.py | 2 | ||||
-rw-r--r-- | numpy/lib/mlab.py | 3 | ||||
-rw-r--r-- | numpy/lib/shape_base.py | 2 |
5 files changed, 8 insertions, 9 deletions
diff --git a/numpy/lib/convertcode.py b/numpy/lib/convertcode.py index d45bd2fe3..b58e56b78 100644 --- a/numpy/lib/convertcode.py +++ b/numpy/lib/convertcode.py @@ -91,12 +91,12 @@ def replaceother(astr): import datetime def fromstr(filestr): filestr = replacetypechars(filestr) - filestr, fromall1 = changeimports(filestr, 'Numeric', 'numpy') + filestr, fromall1 = changeimports(filestr, 'Numeric', 'numpy.oldnumeric') filestr, fromall1 = changeimports(filestr, 'multiarray', 'numpy.core.multiarray') filestr, fromall1 = changeimports(filestr, 'umath', 'numpy.core.umath') - filestr, fromall1 = changeimports(filestr, 'Precision', 'numpy') + filestr, fromall1 = changeimports(filestr, 'Precision', 'numpy.oldnumeric') filestr, fromall2 = changeimports(filestr, 'numerix', 'numpy') filestr, fromall3 = changeimports(filestr, 'scipy_base', 'numpy') filestr, fromall3 = changeimports(filestr, 'MLab', 'numpy.lib.mlab') diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 934f7da33..778aa1e09 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -17,8 +17,8 @@ from numpy.core.numeric import ones, zeros, arange, concatenate, array, \ from numpy.core.numeric import ScalarType, dot, where, newaxis from numpy.core.umath import pi, multiply, add, arctan2, \ frompyfunc, isnan, cos, less_equal, sqrt, sin, mod, exp -from numpy.core.oldnumeric import ravel, nonzero, choose, \ - typecodes, sort +from numpy.core.fromnumeric import ravel, nonzero, choose, sort +from numpy.core.numerictypes import typecodes from numpy.lib.shape_base import atleast_1d from numpy.lib.twodim_base import diag from _compiled_base import digitize, bincount, _insert, add_docstring @@ -160,7 +160,7 @@ def asarray_chkfinite(a): """Like asarray, but check that no NaNs or Infs are present. """ a = asarray(a) - if (a.dtype.char in _nx.typecodes['AllFloat']) \ + if (a.dtype.char in typecodes['AllFloat']) \ and (_nx.isnan(a).any() or _nx.isinf(a).any()): raise ValueError, "array must not contain infs or NaNs" return a diff --git a/numpy/lib/machar.py b/numpy/lib/machar.py index 4c2282454..443fef83b 100644 --- a/numpy/lib/machar.py +++ b/numpy/lib/machar.py @@ -7,7 +7,7 @@ floating-point arithmetic system __all__ = ['MachAr'] -from numpy.core.oldnumeric import any +from numpy.core.fromnumeric import any # Need to speed this up...especially for longfloat diff --git a/numpy/lib/mlab.py b/numpy/lib/mlab.py index cb634b826..e26761117 100644 --- a/numpy/lib/mlab.py +++ b/numpy/lib/mlab.py @@ -3,8 +3,7 @@ from numpy.core.numeric import * from twodim_base import eye, tri, diag, fliplr, flipud, rot90, tril, triu -from numpy.core.oldnumeric import amax as max -from numpy.core.oldnumeric import amin as min +from numpy.core.fromnumeric import amax as max, amin as min from function_base import msort, median, trapz, diff, cov, corrcoef, \ kaiser, blackman, bartlett, hanning, hamming, sinc, angle from numpy.core.oldnumeric import cumsum, ptp, mean, std, prod, cumprod, \ diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py index aae57f984..f313028f1 100644 --- a/numpy/lib/shape_base.py +++ b/numpy/lib/shape_base.py @@ -6,7 +6,7 @@ __all__ = ['atleast_1d','atleast_2d','atleast_3d','vstack','hstack', import numpy.core.numeric as _nx from numpy.core.numeric import asarray, zeros, newaxis, outer, \ concatenate, isscalar, array, asanyarray -from numpy.core.oldnumeric import product, reshape +from numpy.core.fromnumeric import product, reshape def apply_along_axis(func1d,axis,arr,*args): """ Execute func1d(arr[i],*args) where func1d takes 1-D arrays |