@@ -1132,19 +1132,19 @@ def test_pad_backfill_object_segfault():
1132
1132
1133
1133
result = libalgos .pad_object (old , new )
1134
1134
expected = np .array ([- 1 ], dtype = np .int64 )
1135
- assert ( np . array_equal (result , expected ) )
1135
+ tm . assert_numpy_array_equal (result , expected )
1136
1136
1137
1137
result = libalgos .pad_object (new , old )
1138
1138
expected = np .array ([], dtype = np .int64 )
1139
- assert ( np . array_equal (result , expected ) )
1139
+ tm . assert_numpy_array_equal (result , expected )
1140
1140
1141
1141
result = libalgos .backfill_object (old , new )
1142
1142
expected = np .array ([- 1 ], dtype = np .int64 )
1143
- assert ( np . array_equal (result , expected ) )
1143
+ tm . assert_numpy_array_equal (result , expected )
1144
1144
1145
1145
result = libalgos .backfill_object (new , old )
1146
1146
expected = np .array ([], dtype = np .int64 )
1147
- assert ( np . array_equal (result , expected ) )
1147
+ tm . assert_numpy_array_equal (result , expected )
1148
1148
1149
1149
1150
1150
def test_arrmap ():
@@ -1235,15 +1235,6 @@ def test_is_lexsorted():
1235
1235
1236
1236
assert (not libalgos .is_lexsorted (failure ))
1237
1237
1238
- # def test_get_group_index():
1239
- # a = np.array([0, 1, 2, 0, 2, 1, 0, 0], dtype=np.int64)
1240
- # b = np.array([1, 0, 3, 2, 0, 2, 3, 0], dtype=np.int64)
1241
- # expected = np.array([1, 4, 11, 2, 8, 6, 3, 0], dtype=np.int64)
1242
-
1243
- # result = lib.get_group_index([a, b], (3, 4))
1244
-
1245
- # assert(np.array_equal(result, expected))
1246
-
1247
1238
1248
1239
def test_groupsort_indexer ():
1249
1240
a = np .random .randint (0 , 1000 , 100 ).astype (np .int64 )
@@ -1253,13 +1244,13 @@ def test_groupsort_indexer():
1253
1244
1254
1245
# need to use a stable sort
1255
1246
expected = np .argsort (a , kind = 'mergesort' )
1256
- assert ( np . array_equal (result , expected ) )
1247
+ tm . assert_numpy_array_equal (result , expected )
1257
1248
1258
1249
# compare with lexsort
1259
1250
key = a * 1000 + b
1260
1251
result = libalgos .groupsort_indexer (key , 1000000 )[0 ]
1261
1252
expected = np .lexsort ((b , a ))
1262
- assert ( np . array_equal (result , expected ) )
1253
+ tm . assert_numpy_array_equal (result , expected )
1263
1254
1264
1255
1265
1256
def test_infinity_sort ():
0 commit comments