@@ -15,7 +15,7 @@ def test_factorize(categories, ordered):
15
15
categories = categories ,
16
16
ordered = ordered )
17
17
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 )
19
19
expected_uniques = pd .Categorical (['b' , 'a' , 'c' ],
20
20
categories = categories ,
21
21
ordered = ordered )
@@ -27,7 +27,7 @@ def test_factorize(categories, ordered):
27
27
def test_factorized_sort ():
28
28
cat = pd .Categorical (['b' , 'b' , None , 'a' ])
29
29
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 )
31
31
expected_uniques = pd .Categorical (['a' , 'b' ])
32
32
33
33
tm .assert_numpy_array_equal (labels , expected_labels )
@@ -40,7 +40,7 @@ def test_factorized_sort_ordered():
40
40
ordered = True )
41
41
42
42
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 )
44
44
expected_uniques = pd .Categorical (['b' , 'a' ],
45
45
categories = ['c' , 'b' , 'a' ],
46
46
ordered = True )
0 commit comments