#NEWLINE# def append( self , c , d ) : #NEWLINE# #INDENT# if ( self . collapsed is not None ) : #NEWLINE# #INDENT# self . collapsed += ( c [ : , None ] * d [ None , : ] . conj ( ) ) #NEWLINE# return #NEWLINE# #UNINDENT# self . cs . append ( c ) #NEWLINE# self . ds . append ( d ) #NEWLINE# if ( len ( d . cs ) > c . size ) : #NEWLINE# #INDENT# self . collapse ( )