@@ -672,7 +672,7 @@ def test_dmatrix_NA_action():
672672 assert np .array_equal (mat , [[1 , 2 , 20 ],
673673 [1 , 3 , 30 ]])
674674 if return_type == "dataframe" :
675- assert mat .index .equals ([1 , 2 ])
675+ assert mat .index .equals (pandas . Index ( [1 , 2 ]) )
676676 assert_raises (PatsyError , dmatrix , "x + y" , data = data ,
677677 return_type = return_type ,
678678 NA_action = "raise" )
@@ -681,8 +681,8 @@ def test_dmatrix_NA_action():
681681 assert np .array_equal (lmat , [[20 ], [30 ]])
682682 assert np .array_equal (rmat , [[1 , 2 ], [1 , 3 ]])
683683 if return_type == "dataframe" :
684- assert lmat .index .equals ([1 , 2 ])
685- assert rmat .index .equals ([1 , 2 ])
684+ assert lmat .index .equals (pandas . Index ( [1 , 2 ]) )
685+ assert rmat .index .equals (pandas . Index ( [1 , 2 ]) )
686686 assert_raises (PatsyError ,
687687 dmatrices , "y ~ x" , data = data , return_type = return_type ,
688688 NA_action = "raise" )
@@ -693,8 +693,8 @@ def test_dmatrix_NA_action():
693693 assert np .array_equal (lmat , [[20 ], [30 ], [40 ]])
694694 assert np .array_equal (rmat , [[1 ], [1 ], [1 ]])
695695 if return_type == "dataframe" :
696- assert lmat .index .equals ([1 , 2 , 3 ])
697- assert rmat .index .equals ([1 , 2 , 3 ])
696+ assert lmat .index .equals (pandas . Index ( [1 , 2 , 3 ]) )
697+ assert rmat .index .equals (pandas . Index ( [1 , 2 , 3 ]) )
698698 assert_raises (PatsyError ,
699699 dmatrices , "y ~ 1" , data = data , return_type = return_type ,
700700 NA_action = "raise" )
0 commit comments