@@ -76,7 +76,7 @@ def test_lookup(self, table_type, dtype):
76
76
table .map_locations (keys )
77
77
result = table .lookup (keys )
78
78
expected = np .arange (N )
79
- tm .assert_numpy_array_equal (result , expected )
79
+ tm .assert_numpy_array_equal (result . astype ( np . int64 ) , expected . astype ( np . int64 ) )
80
80
81
81
def test_lookup_wrong (self , table_type , dtype ):
82
82
if dtype in (np .int8 , np .uint8 ):
@@ -184,7 +184,7 @@ def test_duplicated_first(self, dtype, type_suffix):
184
184
duplicated = get_ht_function ("duplicated" , type_suffix )
185
185
values = np .repeat (np .arange (N ).astype (dtype ), 5 )
186
186
result = duplicated (values )
187
- expected = np .ones_like (values , dtype = np .bool )
187
+ expected = np .ones_like (values , dtype = np .bool_ )
188
188
expected [::5 ] = False
189
189
tm .assert_numpy_array_equal (result , expected )
190
190
@@ -194,7 +194,7 @@ def test_ismember_yes(self, dtype, type_suffix):
194
194
arr = np .arange (N ).astype (dtype )
195
195
values = np .arange (N ).astype (dtype )
196
196
result = ismember (arr , values )
197
- expected = np .ones_like (values , dtype = np .bool )
197
+ expected = np .ones_like (values , dtype = np .bool_ )
198
198
tm .assert_numpy_array_equal (result , expected )
199
199
200
200
def test_ismember_no (self , dtype , type_suffix ):
@@ -203,7 +203,7 @@ def test_ismember_no(self, dtype, type_suffix):
203
203
arr = np .arange (N ).astype (dtype )
204
204
values = (np .arange (N ) + N ).astype (dtype )
205
205
result = ismember (arr , values )
206
- expected = np .zeros_like (values , dtype = np .bool )
206
+ expected = np .zeros_like (values , dtype = np .bool_ )
207
207
tm .assert_numpy_array_equal (result , expected )
208
208
209
209
def test_mode (self , dtype , type_suffix ):
@@ -247,15 +247,15 @@ def test_ismember_yes(self, dtype, type_suffix):
247
247
arr = np .array ([np .nan , np .nan , np .nan ], dtype = dtype )
248
248
values = np .array ([np .nan , np .nan ], dtype = dtype )
249
249
result = ismember (arr , values )
250
- expected = np .array ([True , True , True ], dtype = np .bool )
250
+ expected = np .array ([True , True , True ], dtype = np .bool_ )
251
251
tm .assert_numpy_array_equal (result , expected )
252
252
253
253
def test_ismember_no (self , dtype , type_suffix ):
254
254
ismember = get_ht_function ("ismember" , type_suffix )
255
255
arr = np .array ([np .nan , np .nan , np .nan ], dtype = dtype )
256
256
values = np .array ([1 ], dtype = dtype )
257
257
result = ismember (arr , values )
258
- expected = np .array ([False , False , False ], dtype = np .bool )
258
+ expected = np .array ([False , False , False ], dtype = np .bool_ )
259
259
tm .assert_numpy_array_equal (result , expected )
260
260
261
261
def test_mode (self , dtype , type_suffix ):
0 commit comments