summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_stride_tricks.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-10-24 14:49:44 -0600
committerCharles Harris <charlesr.harris@gmail.com>2015-10-24 14:49:44 -0600
commitcec39effb1739ae0a7690e56d58d3e9432569d5f (patch)
tree93109dbea169d16fe6847369bb70a1624c59b1b6 /numpy/lib/tests/test_stride_tricks.py
parent2d899ea2301e155b06acf585020866ca1953bce5 (diff)
parent9fa0dba63ac76a43a157e07c2a43f4678355653e (diff)
downloadnumpy-cec39effb1739ae0a7690e56d58d3e9432569d5f.tar.gz
Merge pull request #6556 from shoyer/fix-broadcast-arrays
BUG: error in broadcast_arrays with as_strided array
Diffstat (limited to 'numpy/lib/tests/test_stride_tricks.py')
-rw-r--r--numpy/lib/tests/test_stride_tricks.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_stride_tricks.py b/numpy/lib/tests/test_stride_tricks.py
index aad0695be..06e659002 100644
--- a/numpy/lib/tests/test_stride_tricks.py
+++ b/numpy/lib/tests/test_stride_tricks.py
@@ -390,6 +390,14 @@ def test_writeable():
_, result = broadcast_arrays(0, original)
assert_equal(result.flags.writeable, False)
+ # regresssion test for GH6491
+ shape = (2,)
+ strides = [0]
+ tricky_array = as_strided(np.array(0), shape, strides)
+ other = np.zeros((1,))
+ first, second = broadcast_arrays(tricky_array, other)
+ assert_(first.shape == second.shape)
+
def test_reference_types():
input_array = np.array('a', dtype=object)