summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
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__: