diff options
Diffstat (limited to 'numpy/oldnumeric')
-rw-r--r-- | numpy/oldnumeric/functions.py | 7 | ||||
-rw-r--r-- | numpy/oldnumeric/misc.py | 4 |
2 files changed, 7 insertions, 4 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. diff --git a/numpy/oldnumeric/misc.py b/numpy/oldnumeric/misc.py index eb66e5806..74a643c64 100644 --- a/numpy/oldnumeric/misc.py +++ b/numpy/oldnumeric/misc.py @@ -6,7 +6,7 @@ __all__ = ['load', 'sort', 'copy_reg', 'clip', 'Unpickler', 'rank', 'choose', 'swapaxes', 'array_str', 'pi', 'math', 'concatenate', 'putmask', 'put', 'around', 'vdot', 'transpose', 'array2string', 'diagonal', - 'searchsorted', 'fromfunction', 'copy', 'resize', + 'searchsorted', 'copy', 'resize', 'array_repr', 'e', 'StringIO', 'pickle', 'argsort', 'convolve', 'loads', 'cross_correlate', 'Pickler', 'dot', 'outerproduct', 'innerproduct', 'insert'] @@ -21,7 +21,7 @@ from pickle import load, loads from numpy import sort, clip, rank, sign, shape, putmask, allclose, size,\ choose, swapaxes, array_str, array_repr, e, pi, put, \ - fromfunction, resize, around, concatenate, vdot, transpose, \ + resize, around, concatenate, vdot, transpose, \ diagonal, searchsorted, argsort, convolve, dot, \ outer as outerproduct, inner as innerproduct, correlate as cross_correlate, \ place as insert |