@@ -15,7 +15,7 @@ def test_factorize(categories, ordered):
1515 categories = categories ,
1616 ordered = ordered )
1717 labels , uniques = pd .factorize (cat )
18- expected_labels = np .array ([0 , 0 , 1 , 2 , - 1 ], dtype = 'int64' )
18+ expected_labels = np .array ([0 , 0 , 1 , 2 , - 1 ], dtype = np . intp )
1919 expected_uniques = pd .Categorical (['b' , 'a' , 'c' ],
2020 categories = categories ,
2121 ordered = ordered )
@@ -27,7 +27,7 @@ def test_factorize(categories, ordered):
2727def test_factorized_sort ():
2828 cat = pd .Categorical (['b' , 'b' , None , 'a' ])
2929 labels , uniques = pd .factorize (cat , sort = True )
30- expected_labels = np .array ([1 , 1 , - 1 , 0 ], dtype = 'int64' )
30+ expected_labels = np .array ([1 , 1 , - 1 , 0 ], dtype = np . intp )
3131 expected_uniques = pd .Categorical (['a' , 'b' ])
3232
3333 tm .assert_numpy_array_equal (labels , expected_labels )
@@ -40,7 +40,7 @@ def test_factorized_sort_ordered():
4040 ordered = True )
4141
4242 labels , uniques = pd .factorize (cat , sort = True )
43- expected_labels = np .array ([0 , 0 , - 1 , 1 ], dtype = 'int64' )
43+ expected_labels = np .array ([0 , 0 , - 1 , 1 ], dtype = np . intp )
4444 expected_uniques = pd .Categorical (['b' , 'a' ],
4545 categories = ['c' , 'b' , 'a' ],
4646 ordered = True )
0 commit comments