@@ -1245,21 +1245,6 @@ def test_get_indexer(self):
1245
1245
e1 = np .array ([1 , 3 , - 1 ], dtype = np .intp )
1246
1246
assert_almost_equal (r1 , e1 )
1247
1247
1248
- def test_get_indexer_with_NA_values (self , unique_nulls_fixture ,
1249
- unique_nulls_fixture2 ):
1250
- # GH 22332
1251
- # check pairwise, that no pair of na values
1252
- # is mangled
1253
- if unique_nulls_fixture is unique_nulls_fixture2 :
1254
- return # skip it, values are not unique
1255
- arr = np .array ([unique_nulls_fixture ,
1256
- unique_nulls_fixture2 ], dtype = np .object )
1257
- index = pd .Index (arr , dtype = np .object )
1258
- result = index .get_indexer ([unique_nulls_fixture ,
1259
- unique_nulls_fixture2 , 'Unknown' ])
1260
- expected = np .array ([0 , 1 , - 1 ], dtype = np .int64 )
1261
- tm .assert_numpy_array_equal (result , expected )
1262
-
1263
1248
@pytest .mark .parametrize ("reverse" , [True , False ])
1264
1249
@pytest .mark .parametrize ("expected,method" , [
1265
1250
(np .array ([- 1 , 0 , 0 , 1 , 1 ], dtype = np .intp ), 'pad' ),
@@ -1379,6 +1364,21 @@ def test_get_indexer_numeric_index_boolean_target(self):
1379
1364
expected = np .array ([- 1 , - 1 , - 1 ], dtype = np .intp )
1380
1365
tm .assert_numpy_array_equal (result , expected )
1381
1366
1367
+ def test_get_indexer_with_NA_values (self , unique_nulls_fixture ,
1368
+ unique_nulls_fixture2 ):
1369
+ # GH 22332
1370
+ # check pairwise, that no pair of na values
1371
+ # is mangled
1372
+ if unique_nulls_fixture is unique_nulls_fixture2 :
1373
+ return # skip it, values are not unique
1374
+ arr = np .array ([unique_nulls_fixture ,
1375
+ unique_nulls_fixture2 ], dtype = np .object )
1376
+ index = pd .Index (arr , dtype = np .object )
1377
+ result = index .get_indexer ([unique_nulls_fixture ,
1378
+ unique_nulls_fixture2 , 'Unknown' ])
1379
+ expected = np .array ([0 , 1 , - 1 ], dtype = np .int64 )
1380
+ tm .assert_numpy_array_equal (result , expected )
1381
+
1382
1382
@pytest .mark .parametrize ("method" , [None , 'pad' , 'backfill' , 'nearest' ])
1383
1383
def test_get_loc (self , method ):
1384
1384
index = pd .Index ([0 , 1 , 2 ])
0 commit comments