#NEWLINE# def compute_permutation_matrix( self ) : #NEWLINE# #INDENT# map_identity = np . arange ( 8 ) #NEWLINE# map_rot90 = np . array ( [ 1 , 2 , 3 , 0 , 5 , 6 , 7 , 4 ] ) #NEWLINE# map_flip = np . array ( [ 4 , 5 , 6 , 7 , 0 , 1 , 2 , 3 ] ) #NEWLINE# valid_maps = [ ] #NEWLINE# current_map = map_identity #NEWLINE# for k in xrange ( 4 ) : #NEWLINE# #INDENT# valid_maps . append ( current_map ) #NEWLINE# current_map = current_map [ map_rot90 ] #NEWLINE# #UNINDENT# for k in xrange ( 4 ) : #NEWLINE# #INDENT# valid_maps . append ( current_map [ k ] ) #NEWLINE# current_map = current_map [ map_rot90 ] #NEWLINE# #UNINDENT# self . perm_matrix = np . array ( valid_maps )