@@ -111,7 +111,7 @@ def test_categorical_repr(self):
111
111
112
112
assert repr (c ) == exp
113
113
114
- c = Categorical (np .arange (20 ))
114
+ c = Categorical (np .arange (20 , dtype = np . int64 ))
115
115
exp = """[0, 1, 2, 3, 4, ..., 15, 16, 17, 18, 19]
116
116
Length: 20
117
117
Categories (20, int64): [0, 1, 2, 3, ..., 16, 17, 18, 19]"""
@@ -138,7 +138,7 @@ def test_categorical_repr_ordered(self):
138
138
139
139
assert repr (c ) == exp
140
140
141
- c = Categorical (np .arange (20 ), ordered = True )
141
+ c = Categorical (np .arange (20 , dtype = np . int64 ), ordered = True )
142
142
exp = """[0, 1, 2, 3, 4, ..., 15, 16, 17, 18, 19]
143
143
Length: 20
144
144
Categories (20, int64): [0 < 1 < 2 < 3 ... 16 < 17 < 18 < 19]"""
@@ -380,7 +380,7 @@ def test_categorical_index_repr(self):
380
380
exp = """CategoricalIndex([1, 2, 3], categories=[1, 2, 3], ordered=False, dtype='category')""" # noqa:E501
381
381
assert repr (idx ) == exp
382
382
383
- i = CategoricalIndex (Categorical (np .arange (10 )))
383
+ i = CategoricalIndex (Categorical (np .arange (10 , dtype = np . int64 )))
384
384
exp = """CategoricalIndex([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], categories=[0, 1, 2, 3, ..., 6, 7, 8, 9], ordered=False, dtype='category')""" # noqa:E501
385
385
assert repr (i ) == exp
386
386
@@ -389,7 +389,7 @@ def test_categorical_index_repr_ordered(self):
389
389
exp = """CategoricalIndex([1, 2, 3], categories=[1, 2, 3], ordered=True, dtype='category')""" # noqa:E501
390
390
assert repr (i ) == exp
391
391
392
- i = CategoricalIndex (Categorical (np .arange (10 ), ordered = True ))
392
+ i = CategoricalIndex (Categorical (np .arange (10 , dtype = np . int64 ), ordered = True ))
393
393
exp = """CategoricalIndex([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], categories=[0, 1, 2, 3, ..., 6, 7, 8, 9], ordered=True, dtype='category')""" # noqa:E501
394
394
assert repr (i ) == exp
395
395
0 commit comments