#NEWLINE# def test_transform_dense( ) : #NEWLINE# #INDENT# sel = StepSelector ( ) #NEWLINE# Xt_actual = sel . fit ( X , y ) . transform ( X ) #NEWLINE# Xt_actual2 = StepSelector ( ) . fit_transform ( X , y ) #NEWLINE# assert_array_equal ( Xt , Xt_actual ) #NEWLINE# assert_array_equal ( Xt , Xt_actual ) #NEWLINE# assert_equal ( np . int32 , sel . transform ( X . astype ( np . int32 ) ) . dtype ) #NEWLINE# assert_equal ( np . float32 , sel . transform ( X . astype ( np . float32 ) ) . dtype ) #NEWLINE# names_t_actual = sel . transform ( [ feature_names ] ) #NEWLINE# assert_array_equal ( feature_names_t , names_t_actual . ravel ( ) ) #NEWLINE# assert_raises ( ValueError , sel . transform , np . array ( [ [ 1 ] , [ 2 ] ] ) )