@@ -134,7 +134,7 @@ def guess_categorical(data):
134134
135135def test_guess_categorical ():
136136 if have_pandas_categorical :
137- c = pandas .Categorical . from_array ([1 , 2 , 3 ])
137+ c = pandas .Categorical ([1 , 2 , 3 ])
138138 assert guess_categorical (c )
139139 if have_pandas_categorical_dtype :
140140 assert guess_categorical (pandas .Series (c ))
@@ -242,15 +242,15 @@ def t(NA_types, datas, exp_finish_fast, exp_levels, exp_contrast=None):
242242 preps += [pandas .Series ,
243243 lambda x : C (pandas .Series (x ))]
244244 for prep in preps :
245- t ([], [prep (pandas .Categorical . from_array ([1 , 2 , None ]))],
245+ t ([], [prep (pandas .Categorical ([1 , 2 , None ]))],
246246 True , (1 , 2 ))
247247 # check order preservation
248248 t ([], [prep (pandas_Categorical_from_codes ([1 , 0 ], ["a" , "b" ]))],
249249 True , ("a" , "b" ))
250250 t ([], [prep (pandas_Categorical_from_codes ([1 , 0 ], ["b" , "a" ]))],
251251 True , ("b" , "a" ))
252252 # check that if someone sticks a .contrast field onto our object
253- obj = prep (pandas .Categorical . from_array (["a" , "b" ]))
253+ obj = prep (pandas .Categorical (["a" , "b" ]))
254254 obj .contrast = "CONTRAST"
255255 t ([], [obj ], True , ("a" , "b" ), "CONTRAST" )
256256
0 commit comments