diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-08-05 06:44:20 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-08-05 06:44:20 +0000 |
commit | 04d79b539391064f6a81fba9ffa45e6371ffcedd (patch) | |
tree | be47fa1a0fe4a0a41bfde371dfd0d0d16c397d1e /numpy/oldnumeric/functions.py | |
parent | d6eb562b8d4b37be1f2c6743bae5ea520703da64 (diff) | |
download | numpy-04d79b539391064f6a81fba9ffa45e6371ffcedd.tar.gz |
Fixes for the recent change to oldnumeric
Diffstat (limited to 'numpy/oldnumeric/functions.py')
-rw-r--r-- | numpy/oldnumeric/functions.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/numpy/oldnumeric/functions.py b/numpy/oldnumeric/functions.py index 60cce30c3..4c09dfa16 100644 --- a/numpy/oldnumeric/functions.py +++ b/numpy/oldnumeric/functions.py @@ -3,19 +3,19 @@ import numpy as N import numpy.core.multiarray as mu import numpy.core.numeric as nn -from typeconv import convtypecode +from typeconv import convtypecode, convtypecode2 __all__ = ['take', 'repeat', 'sum', 'product', 'sometrue', 'alltrue', - 'cumsum', 'cumproduct'] -__all__ += ['ones', 'empty', 'identity', 'zeros', 'array', 'asarray', 'nonzero', - 'reshape', 'arange', 'fromstring', 'ravel', 'trace', 'indices', - 'where'] + 'cumsum', 'cumproduct', + 'ones', 'empty', 'identity', 'zeros', 'array', 'asarray', + 'nonzero', 'reshape', 'arange', 'fromstring', 'ravel', 'trace', + 'indices', 'where'] def take(a, indicies, axis=0): return N.take(a, indicies, axis) def repeat(a, repeats, axis=0): - return N.repeats(a, repeats, axis) + return N.repeat(a, repeats, axis) def sum(x, axis=0): return N.sum(x, axis) @@ -62,11 +62,11 @@ def empty(shape, typecode='l', dtype=None): return mu.empty(shape, dtype, order) def array(sequence, typecode=None, copy=1, savespace=0, dtype=None): - dtype = convtypecode(typecode, dtype) + dtype = convtypecode2(typecode, dtype) return mu.array(sequence, dtype, copy=copy) def asarray(a, typecode=None, dtype=None): - dtype = convtypecode(typecode, dtype) + dtype = convtypecode2(typecode, dtype) return mu.array(a, dtype, copy=0) def nonzero(a): @@ -80,7 +80,7 @@ def reshape(a, shape): return N.reshape(a, shape) def arange(start, stop=None, step=1, typecode=None, dtype=None): - dtype = convtypecode(typecode, dtype) + dtype = convtypecode2(typecode, dtype) return mu.arange(start, stop, step, dtype) def fromstring(string, typecode='l', count=-1, dtype=None): |