summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-06-01 04:37:36 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-06-01 04:37:36 +0000
commit5a85dd3d9557c5aa4119ced4ebd47e0e8e3f1142 (patch)
treea2faa5c7f434c404011b70f5024f5a58a4631e27 /numpy/core/numeric.py
parent56be9fd122e1ea37e6bec3abaf0f4714284a5380 (diff)
downloadnumpy-5a85dd3d9557c5aa4119ced4ebd47e0e8e3f1142.tar.gz
Fix-up test_scalarmath to compare against ufuncs.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 6489be17a..c27bb19ae 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -11,6 +11,7 @@ __all__ = ['newaxis', 'ndarray', 'flatiter', 'ufunc',
'array2string', 'get_printoptions', 'set_printoptions',
'array_repr', 'array_str', 'set_string_function',
'little_endian',
+ 'fromiter',
'indices', 'fromfunction',
'load', 'loads', 'isscalar', 'binary_repr', 'base_repr',
'ones', 'identity', 'allclose',
@@ -67,6 +68,10 @@ def empty_like(a):
# end Fernando's utilities
+def fromiter(obj, dtype=None):
+ obj = list(obj)
+ return array(obj, dtype=dtype)
+
def extend_all(module):
adict = {}
for a in __all__: