@@ -51,15 +51,15 @@ def test_maybe_indices_to_slice_left_edge(self):
5151 target = np .arange (100 )
5252
5353 # slice
54- indices = np .array ([], dtype = np .int64 )
54+ indices = np .array ([], dtype = np .intp )
5555 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
5656
5757 assert isinstance (maybe_slice , slice )
5858 tm .assert_numpy_array_equal (target [indices ], target [maybe_slice ])
5959
6060 for end in [1 , 2 , 5 , 20 , 99 ]:
6161 for step in [1 , 2 , 4 ]:
62- indices = np .arange (0 , end , step , dtype = np .int64 )
62+ indices = np .arange (0 , end , step , dtype = np .intp )
6363 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
6464
6565 assert isinstance (maybe_slice , slice )
@@ -74,7 +74,7 @@ def test_maybe_indices_to_slice_left_edge(self):
7474
7575 # not slice
7676 for case in [[2 , 1 , 2 , 0 ], [2 , 2 , 1 , 0 ], [0 , 1 , 2 , 1 ], [- 2 , 0 , 2 ], [2 , 0 , - 2 ]]:
77- indices = np .array (case , dtype = np .int64 )
77+ indices = np .array (case , dtype = np .intp )
7878 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
7979
8080 assert not isinstance (maybe_slice , slice )
@@ -87,7 +87,7 @@ def test_maybe_indices_to_slice_right_edge(self):
8787 # slice
8888 for start in [0 , 2 , 5 , 20 , 97 , 98 ]:
8989 for step in [1 , 2 , 4 ]:
90- indices = np .arange (start , 99 , step , dtype = np .int64 )
90+ indices = np .arange (start , 99 , step , dtype = np .intp )
9191 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
9292
9393 assert isinstance (maybe_slice , slice )
@@ -101,7 +101,7 @@ def test_maybe_indices_to_slice_right_edge(self):
101101 tm .assert_numpy_array_equal (target [indices ], target [maybe_slice ])
102102
103103 # not slice
104- indices = np .array ([97 , 98 , 99 , 100 ], dtype = np .int64 )
104+ indices = np .array ([97 , 98 , 99 , 100 ], dtype = np .intp )
105105 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
106106
107107 assert not isinstance (maybe_slice , slice )
@@ -114,7 +114,7 @@ def test_maybe_indices_to_slice_right_edge(self):
114114 with pytest .raises (IndexError , match = msg ):
115115 target [maybe_slice ]
116116
117- indices = np .array ([100 , 99 , 98 , 97 ], dtype = np .int64 )
117+ indices = np .array ([100 , 99 , 98 , 97 ], dtype = np .intp )
118118 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
119119
120120 assert not isinstance (maybe_slice , slice )
@@ -126,7 +126,7 @@ def test_maybe_indices_to_slice_right_edge(self):
126126 target [maybe_slice ]
127127
128128 for case in [[99 , 97 , 99 , 96 ], [99 , 99 , 98 , 97 ], [98 , 98 , 97 , 96 ]]:
129- indices = np .array (case , dtype = np .int64 )
129+ indices = np .array (case , dtype = np .intp )
130130 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
131131
132132 assert not isinstance (maybe_slice , slice )
@@ -138,7 +138,7 @@ def test_maybe_indices_to_slice_both_edges(self):
138138
139139 # slice
140140 for step in [1 , 2 , 4 , 5 , 8 , 9 ]:
141- indices = np .arange (0 , 9 , step , dtype = np .int64 )
141+ indices = np .arange (0 , 9 , step , dtype = np .intp )
142142 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
143143 assert isinstance (maybe_slice , slice )
144144 tm .assert_numpy_array_equal (target [indices ], target [maybe_slice ])
@@ -151,7 +151,7 @@ def test_maybe_indices_to_slice_both_edges(self):
151151
152152 # not slice
153153 for case in [[4 , 2 , 0 , - 2 ], [2 , 2 , 1 , 0 ], [0 , 1 , 2 , 1 ]]:
154- indices = np .array (case , dtype = np .int64 )
154+ indices = np .array (case , dtype = np .intp )
155155 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
156156 assert not isinstance (maybe_slice , slice )
157157 tm .assert_numpy_array_equal (maybe_slice , indices )
@@ -163,7 +163,7 @@ def test_maybe_indices_to_slice_middle(self):
163163 # slice
164164 for start , end in [(2 , 10 ), (5 , 25 ), (65 , 97 )]:
165165 for step in [1 , 2 , 4 , 20 ]:
166- indices = np .arange (start , end , step , dtype = np .int64 )
166+ indices = np .arange (start , end , step , dtype = np .intp )
167167 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
168168
169169 assert isinstance (maybe_slice , slice )
@@ -178,7 +178,7 @@ def test_maybe_indices_to_slice_middle(self):
178178
179179 # not slice
180180 for case in [[14 , 12 , 10 , 12 ], [12 , 12 , 11 , 10 ], [10 , 11 , 12 , 11 ]]:
181- indices = np .array (case , dtype = np .int64 )
181+ indices = np .array (case , dtype = np .intp )
182182 maybe_slice = lib .maybe_indices_to_slice (indices , len (target ))
183183
184184 assert not isinstance (maybe_slice , slice )
0 commit comments