summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_index_tricks.py
diff options
context:
space:
mode:
authorgfyoung <gfyoung17@gmail.com>2016-02-18 18:43:00 +0000
committergfyoung <gfyoung17@gmail.com>2016-02-18 18:43:05 +0000
commit0f4f8807b93375b14856d3b34a0dea73bdb64b73 (patch)
tree4802bc316b0f222a8a5cf6422decb8464105b482 /numpy/lib/tests/test_index_tricks.py
parentec5bd813061ceb766cf78d04c6d72a80804110e0 (diff)
downloadnumpy-0f4f8807b93375b14856d3b34a0dea73bdb64b73.tar.gz
BUG: Make returned unravel_index arrays writeable
Closes gh-7269.
Diffstat (limited to 'numpy/lib/tests/test_index_tricks.py')
-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):