@@ -256,8 +256,7 @@ def test_get_indexer_three_or_more_levels():
256
256
assert mult_idx_1 [- 1 ] < mult_idx_2 [6 ]
257
257
258
258
indexer_no_fill = mult_idx_1 .get_indexer (mult_idx_2 )
259
- expected = np .array ([- 1 , - 1 , 5 , - 1 , - 1 , - 1 , - 1 ],
260
- dtype = indexer_no_fill .dtype )
259
+ expected = np .array ([- 1 , - 1 , 5 , - 1 , - 1 , - 1 , - 1 ], dtype = indexer_no_fill .dtype )
261
260
tm .assert_almost_equal (expected , indexer_no_fill )
262
261
263
262
# test with backfilling
@@ -285,18 +284,19 @@ def test_get_indexer_three_or_more_levels():
285
284
assert mult_idx_2 [5 ] < mult_idx_1 [11 ] < mult_idx_2 [6 ]
286
285
287
286
indexer = mult_idx_2 .get_indexer (mult_idx_1 )
288
- expected = np .array ([- 1 , - 1 , - 1 , - 1 , - 1 , 2 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 ],
289
- dtype = indexer .dtype )
287
+ expected = np .array (
288
+ [- 1 , - 1 , - 1 , - 1 , - 1 , 2 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 ], dtype = indexer .dtype
289
+ )
290
290
tm .assert_almost_equal (expected , indexer )
291
291
292
292
backfill_indexer = mult_idx_2 .get_indexer (mult_idx_1 , method = "bfill" )
293
- expected = np .array ([1 , 1 , 1 , 1 , 2 , 2 , 6 , 6 , 6 , 6 , 6 , 6 ],
294
- dtype = backfill_indexer .dtype )
293
+ expected = np .array (
294
+ [1 , 1 , 1 , 1 , 2 , 2 , 6 , 6 , 6 , 6 , 6 , 6 ], dtype = backfill_indexer .dtype
295
+ )
295
296
tm .assert_almost_equal (expected , backfill_indexer )
296
297
297
298
pad_indexer = mult_idx_2 .get_indexer (mult_idx_1 , method = "pad" )
298
- expected = np .array ([0 , 0 , 0 , 0 , 1 , 2 , 5 , 5 , 5 , 5 , 5 , 5 ],
299
- dtype = pad_indexer .dtype )
299
+ expected = np .array ([0 , 0 , 0 , 0 , 1 , 2 , 5 , 5 , 5 , 5 , 5 , 5 ], dtype = pad_indexer .dtype )
300
300
tm .assert_almost_equal (expected , pad_indexer )
301
301
302
302
0 commit comments