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