@@ -50,15 +50,15 @@ def test_maybe_indices_to_slice_left_edge(self):
5050 target = np .arange (100 )
5151
5252 # slice
53- indices = np .array ([], dtype = np .int64 )
53+ indices = np .array ([], dtype = np .intp )
5454 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
5555
5656 assert isinstance (maybe_slice , slice )
5757 tm .assert_numpy_array_equal (target [indices ], target [maybe_slice ])
5858
5959 for end in [1 , 2 , 5 , 20 , 99 ]:
6060 for step in [1 , 2 , 4 ]:
61- indices = np .arange (0 , end , step , dtype = np .int64 )
61+ indices = np .arange (0 , end , step , dtype = np .intp )
6262 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
6363
6464 assert isinstance (maybe_slice , slice )
@@ -73,7 +73,7 @@ def test_maybe_indices_to_slice_left_edge(self):
7373
7474 # not slice
7575 for case in [[2 , 1 , 2 , 0 ], [2 , 2 , 1 , 0 ], [0 , 1 , 2 , 1 ], [- 2 , 0 , 2 ], [2 , 0 , - 2 ]]:
76- indices = np .array (case , dtype = np .int64 )
76+ indices = np .array (case , dtype = np .intp )
7777 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
7878
7979 assert not isinstance (maybe_slice , slice )
@@ -86,7 +86,7 @@ def test_maybe_indices_to_slice_right_edge(self):
8686 # slice
8787 for start in [0 , 2 , 5 , 20 , 97 , 98 ]:
8888 for step in [1 , 2 , 4 ]:
89- indices = np .arange (start , 99 , step , dtype = np .int64 )
89+ indices = np .arange (start , 99 , step , dtype = np .intp )
9090 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
9191
9292 assert isinstance (maybe_slice , slice )
@@ -100,7 +100,7 @@ def test_maybe_indices_to_slice_right_edge(self):
100100 tm .assert_numpy_array_equal (target [indices ], target [maybe_slice ])
101101
102102 # not slice
103- indices = np .array ([97 , 98 , 99 , 100 ], dtype = np .int64 )
103+ indices = np .array ([97 , 98 , 99 , 100 ], dtype = np .intp )
104104 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
105105
106106 assert not isinstance (maybe_slice , slice )
@@ -113,7 +113,7 @@ def test_maybe_indices_to_slice_right_edge(self):
113113 with pytest .raises (IndexError , match = msg ):
114114 target [maybe_slice ]
115115
116- indices = np .array ([100 , 99 , 98 , 97 ], dtype = np .int64 )
116+ indices = np .array ([100 , 99 , 98 , 97 ], dtype = np .intp )
117117 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
118118
119119 assert not isinstance (maybe_slice , slice )
@@ -125,7 +125,7 @@ def test_maybe_indices_to_slice_right_edge(self):
125125 target [maybe_slice ]
126126
127127 for case in [[99 , 97 , 99 , 96 ], [99 , 99 , 98 , 97 ], [98 , 98 , 97 , 96 ]]:
128- indices = np .array (case , dtype = np .int64 )
128+ indices = np .array (case , dtype = np .intp )
129129 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
130130
131131 assert not isinstance (maybe_slice , slice )
@@ -137,7 +137,7 @@ def test_maybe_indices_to_slice_both_edges(self):
137137
138138 # slice
139139 for step in [1 , 2 , 4 , 5 , 8 , 9 ]:
140- indices = np .arange (0 , 9 , step , dtype = np .int64 )
140+ indices = np .arange (0 , 9 , step , dtype = np .intp )
141141 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
142142 assert isinstance (maybe_slice , slice )
143143 tm .assert_numpy_array_equal (target [indices ], target [maybe_slice ])
@@ -150,7 +150,7 @@ def test_maybe_indices_to_slice_both_edges(self):
150150
151151 # not slice
152152 for case in [[4 , 2 , 0 , - 2 ], [2 , 2 , 1 , 0 ], [0 , 1 , 2 , 1 ]]:
153- indices = np .array (case , dtype = np .int64 )
153+ indices = np .array (case , dtype = np .intp )
154154 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
155155 assert not isinstance (maybe_slice , slice )
156156 tm .assert_numpy_array_equal (maybe_slice , indices )
@@ -162,7 +162,7 @@ def test_maybe_indices_to_slice_middle(self):
162162 # slice
163163 for start , end in [(2 , 10 ), (5 , 25 ), (65 , 97 )]:
164164 for step in [1 , 2 , 4 , 20 ]:
165- indices = np .arange (start , end , step , dtype = np .int64 )
165+ indices = np .arange (start , end , step , dtype = np .intp )
166166 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
167167
168168 assert isinstance (maybe_slice , slice )
@@ -177,7 +177,7 @@ def test_maybe_indices_to_slice_middle(self):
177177
178178 # not slice
179179 for case in [[14 , 12 , 10 , 12 ], [12 , 12 , 11 , 10 ], [10 , 11 , 12 , 11 ]]:
180- indices = np .array (case , dtype = np .int64 )
180+ indices = np .array (case , dtype = np .intp )
181181 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
182182
183183 assert not isinstance (maybe_slice , slice )
0 commit comments