1818from pandas .errors import PerformanceWarning , UnsortedIndexError
1919from pandas .core .dtypes .dtypes import CategoricalDtype
2020from pandas .core .indexes .base import InvalidIndexError
21- from pandas ._libs import lib
21+ from pandas .core . dtypes . cast import construct_1d_array_from_listlike
2222from pandas ._libs .lib import Timestamp
2323
2424import pandas .util .testing as tm
@@ -913,7 +913,7 @@ def test_from_product_invalid_input(self):
913913 def test_from_product_datetimeindex (self ):
914914 dt_index = date_range ('2000-01-01' , periods = 2 )
915915 mi = pd .MultiIndex .from_product ([[1 , 2 ], dt_index ])
916- etalon = lib . list_to_object_array ([(1 , pd .Timestamp (
916+ etalon = construct_1d_array_from_listlike ([(1 , pd .Timestamp (
917917 '2000-01-01' )), (1 , pd .Timestamp ('2000-01-02' )), (2 , pd .Timestamp (
918918 '2000-01-01' )), (2 , pd .Timestamp ('2000-01-02' ))])
919919 tm .assert_numpy_array_equal (mi .values , etalon )
@@ -940,7 +940,7 @@ def test_values_boxed(self):
940940 (3 , pd .Timestamp ('2000-01-03' ))]
941941 mi = pd .MultiIndex .from_tuples (tuples )
942942 tm .assert_numpy_array_equal (mi .values ,
943- lib . list_to_object_array (tuples ))
943+ construct_1d_array_from_listlike (tuples ))
944944 # Check that code branches for boxed values produce identical results
945945 tm .assert_numpy_array_equal (mi .values [:4 ], mi [:4 ].values )
946946
0 commit comments