@@ -111,7 +111,7 @@ def test_categorical_repr(self):
111111
112112 assert repr (c ) == exp
113113
114- c = Categorical (np .arange (20 ))
114+ c = Categorical (np .arange (20 , dtype = np . int64 ))
115115 exp = """[0, 1, 2, 3, 4, ..., 15, 16, 17, 18, 19]
116116Length: 20
117117Categories (20, int64): [0, 1, 2, 3, ..., 16, 17, 18, 19]"""
@@ -138,7 +138,7 @@ def test_categorical_repr_ordered(self):
138138
139139 assert repr (c ) == exp
140140
141- c = Categorical (np .arange (20 ), ordered = True )
141+ c = Categorical (np .arange (20 , dtype = np . int64 ), ordered = True )
142142 exp = """[0, 1, 2, 3, 4, ..., 15, 16, 17, 18, 19]
143143Length: 20
144144Categories (20, int64): [0 < 1 < 2 < 3 ... 16 < 17 < 18 < 19]"""
@@ -380,7 +380,7 @@ def test_categorical_index_repr(self):
380380 exp = """CategoricalIndex([1, 2, 3], categories=[1, 2, 3], ordered=False, dtype='category')""" # noqa:E501
381381 assert repr (idx ) == exp
382382
383- i = CategoricalIndex (Categorical (np .arange (10 )))
383+ i = CategoricalIndex (Categorical (np .arange (10 , dtype = np . int64 )))
384384 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
385385 assert repr (i ) == exp
386386
@@ -389,7 +389,7 @@ def test_categorical_index_repr_ordered(self):
389389 exp = """CategoricalIndex([1, 2, 3], categories=[1, 2, 3], ordered=True, dtype='category')""" # noqa:E501
390390 assert repr (i ) == exp
391391
392- i = CategoricalIndex (Categorical (np .arange (10 ), ordered = True ))
392+ i = CategoricalIndex (Categorical (np .arange (10 , dtype = np . int64 ), ordered = True ))
393393 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
394394 assert repr (i ) == exp
395395
0 commit comments