summaryrefslogtreecommitdiff
path: root/numpy/lib/stride_tricks.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/stride_tricks.py')
-rw-r--r--numpy/lib/stride_tricks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/stride_tricks.py b/numpy/lib/stride_tricks.py
index 5c9d222f3..1f08131ec 100644
--- a/numpy/lib/stride_tricks.py
+++ b/numpy/lib/stride_tricks.py
@@ -60,7 +60,7 @@ def broadcast_arrays(*args):
Here is a useful idiom for getting contiguous copies instead of
non-contiguous views.
- >>> map(np.array, np.broadcast_arrays(x, y))
+ >>> [np.array(a) for a in np.broadcast_arrays(x, y)]
[array([[1, 2, 3],
[1, 2, 3],
[1, 2, 3]]), array([[1, 1, 1],
@@ -68,7 +68,7 @@ def broadcast_arrays(*args):
[3, 3, 3]])]
"""
- args = map(np.asarray, args)
+ args = [np.asarray(_m) for _m in args]
shapes = [x.shape for x in args]
if len(set(shapes)) == 1:
# Common case where nothing needs to be broadcasted.