From 04d79b539391064f6a81fba9ffa45e6371ffcedd Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Sat, 5 Aug 2006 06:44:20 +0000 Subject: Fixes for the recent change to oldnumeric --- numpy/oldnumeric/functions.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'numpy/oldnumeric/functions.py') 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): -- cgit v1.2.1