summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
diff options
context:
space:
mode:
authorseberg <sebastian@sipsolutions.net>2016-02-18 22:09:24 +0100
committerseberg <sebastian@sipsolutions.net>2016-02-18 22:09:24 +0100
commit4991e212422eeef6b5223ccdcf093a27db550e95 (patch)
tree4802bc316b0f222a8a5cf6422decb8464105b482 /numpy/lib/tests
parentec5bd813061ceb766cf78d04c6d72a80804110e0 (diff)
parent0f4f8807b93375b14856d3b34a0dea73bdb64b73 (diff)
downloadnumpy-4991e212422eeef6b5223ccdcf093a27db550e95.tar.gz
Merge pull request #7278 from gfyoung/unravel_writable
BUG: Make returned unravel_index arrays writeable
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r--numpy/lib/tests/test_index_tricks.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py
index bb2ae1509..919791ae5 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -86,6 +86,12 @@ class TestRavelUnravelIndex(TestCase):
assert_raises(
ValueError, np.ravel_multi_index, [5, 1, -1, 2], (4, 3, 7, 12))
+ def test_writeability(self):
+ # See gh-7269
+ x, y = np.unravel_index([1, 2, 3], (4, 5))
+ self.assertTrue(x.flags.writeable)
+ self.assertTrue(y.flags.writeable)
+
class TestGrid(TestCase):
def test_basic(self):