summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_index_tricks.py
diff options
context:
space:
mode:
authorShota Kawabuchi <shota.kawabuchi+Github@gmail.com>2016-09-26 06:27:02 +0900
committerShota Kawabuchi <shota.kawabuchi+Github@gmail.com>2016-09-26 06:27:02 +0900
commit90c166542f39221f68a154a8406b961f5971bff3 (patch)
tree0636db3cef62d158ccfd5c802ed8c9b25eb3d500 /numpy/lib/tests/test_index_tricks.py
parenta17e905faa20fcdd1b3f039bceef6efa19671bb3 (diff)
downloadnumpy-90c166542f39221f68a154a8406b961f5971bff3.tar.gz
BUG: fix ravel_multi_index for big indices (issue #7546)
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 919791ae5..f685528e7 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -47,6 +47,12 @@ class TestRavelUnravelIndex(TestCase):
[[3, 6, 6], [4, 5, 1]])
assert_equal(np.unravel_index(1621, (6, 7, 8, 9)), [3, 1, 4, 1])
+ # ravel_multi_index for big indices (issue#7546)
+ arr = ([1, 29], [3, 5], [3, 117], [19, 2], [2379, 1284], [2, 2], [0, 1])
+ assert_equal(
+ np.ravel_multi_index(arr, (41, 7, 120, 36, 2706, 8, 6)),
+ [5627771580, 117259570957])
+
def test_dtypes(self):
# Test with different data types
for dtype in [np.int16, np.uint16, np.int32,