summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-08-29 02:28:52 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-08-29 02:28:52 +0000
commit43a2c85455d47a977762d07ea02e1acc55de8ea9 (patch)
tree9bf1e4a3005cea16eaef289feea817e9e6042ce7 /numpy/core
parent6194dc01c1aae4e3fcb7426c2a873daf850ad199 (diff)
downloadnumpy-43a2c85455d47a977762d07ea02e1acc55de8ea9.tar.gz
Add a regression test to show #771 failure.
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/tests/test_regression.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 9f282efb5..e2d538285 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -843,6 +843,12 @@ class TestRegression(TestCase):
"""Ticket #658"""
np.indices((0,3,4)).T.reshape(-1,3)
+ def test_copy_detection_corner_case2(self, level=rlevel):
+ """Ticket #771: strides are not set correctly when reshaping 0-sized
+ arrays"""
+ b = np.indices((0,3,4)).T.reshape(-1,3)
+ assert_equal(b.strides, (24, 4))
+
def test_object_array_refcounting(self, level=rlevel):
"""Ticket #633"""
if not hasattr(sys, 'getrefcount'):