diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-01-15 03:10:36 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-01-15 03:10:36 +0000 |
commit | 0283b6f480b7239dc1390dadf29fcb5e1f2516e3 (patch) | |
tree | 6d75e6fb25fb7ff9e5668df1dfad9c7edba7a00e /numpy/core/oldnumeric.py | |
parent | d04bb02f393f0122e52b804bf548e0e18a0a2ecc (diff) | |
download | numpy-0283b6f480b7239dc1390dadf29fcb5e1f2516e3.tar.gz |
Moved .dtypedescr to .dtype; .dtype->.dtype.type; .dtypestr ->.dtype.str; .dtypechar -> .dtype.char
Diffstat (limited to 'numpy/core/oldnumeric.py')
-rw-r--r-- | numpy/core/oldnumeric.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/oldnumeric.py b/numpy/core/oldnumeric.py index 4fcccff56..09f7775f0 100644 --- a/numpy/core/oldnumeric.py +++ b/numpy/core/oldnumeric.py @@ -261,7 +261,7 @@ def resize(a, new_shape): new_shape = (new_shape,) a = ravel(a) Na = len(a) - if not Na: return mu.zeros(new_shape, a.dtypechar) + if not Na: return mu.zeros(new_shape, a.dtype.char) total_size = um.multiply.reduce(new_shape) n_copies = int(total_size / Na) extra = total_size % Na @@ -447,9 +447,9 @@ def round_(a, decimals=0): and imaginary parts separately if the array is complex. """ a = asarray(a) - if not issubclass(a.dtype, _nx.inexact): + if not issubclass(a.dtype.type, _nx.inexact): return a - if issubclass(a.dtype, _nx.complexfloating): + if issubclass(a.dtype.type, _nx.complexfloating): return round_(a.real, decimals) + 1j*round_(a.imag, decimals) if decimals is not 0: decimals = asarray(decimals) |