diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-09-28 09:56:41 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-09-28 09:56:41 +0000 |
commit | 7906451af30f3c29250937863b22199cf9f42dfd (patch) | |
tree | 53463f5e33fb7b7c87b7f6b892c4c280fe36d181 /numpy/oldnumeric/functions.py | |
parent | 483ce064ed954b8b9235f69f06bbbcff35d5fe4d (diff) | |
download | numpy-7906451af30f3c29250937863b22199cf9f42dfd.tar.gz |
Fix the fromfunction routine to use float as default. Update oldnumeric and numarray compatibility modules.
Diffstat (limited to 'numpy/oldnumeric/functions.py')
-rw-r--r-- | numpy/oldnumeric/functions.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/oldnumeric/functions.py b/numpy/oldnumeric/functions.py index e295c11bd..7d6d8abfa 100644 --- a/numpy/oldnumeric/functions.py +++ b/numpy/oldnumeric/functions.py @@ -6,7 +6,7 @@ import numpy.core.numeric as nn from typeconv import convtypecode, convtypecode2 __all__ = ['take', 'repeat', 'sum', 'product', 'sometrue', 'alltrue', - 'cumsum', 'cumproduct', 'compress', + 'cumsum', 'cumproduct', 'compress', 'fromfunction', 'ones', 'empty', 'identity', 'zeros', 'array', 'asarray', 'nonzero', 'reshape', 'arange', 'fromstring', 'ravel', 'trace', 'indices', 'where','sarray','cross_product', 'argmax', 'argmin', @@ -44,7 +44,10 @@ def argmin(x, axis=-1): def compress(condition, m, axis=-1): return N.compress(condition, m, axis) - + +def fromfunction(args, dimensions): + return N.fromfunction(args, dimensions, dtype=int) + def ones(shape, typecode='l', savespace=0, dtype=None): """ones(shape, dtype=int) returns an array of the given dimensions which is initialized to all ones. |