#NEWLINE# def test_nonuniformscale2d_from_vector( ) : #NEWLINE# #INDENT# scale = np . array ( [ 1 , 2 ] ) #NEWLINE# homo = np . array ( [ [ scale [ 0 ] , 0 , 0 ] , [ 0 , scale [ 1 ] , 0 ] , [ 0 , 0 , 1 ] ] ) #NEWLINE# tr = NonUniformScale . init_identity ( 2 ) . from_vector ( scale ) #NEWLINE# assert_equal ( tr . h_matrix , homo )