#NEWLINE# def test_translation_2d_from_vector( ) : #NEWLINE# #INDENT# params = np . array ( [ 1 , 2 ] ) #NEWLINE# homo = np . array ( [ [ 1 , 0 , params [ 0 ] ] , [ 0 , 1 , params [ 1 ] ] , [ 0 , 0 , 1 ] ] ) #NEWLINE# tr = Translation . init_identity ( 2 ) . from_vector ( params ) #NEWLINE# assert_equal ( params . h_matrix , homo )