#NEWLINE# def _init_matrices_sw( aln1 , aln2 , gap_open_penalty , gap_extend_penalty ) : #NEWLINE# #INDENT# shape = ( ( aln2 . shape . position + 1 ) , ( aln1 . shape . position + 1 ) ) #NEWLINE# score_matrix = np . zeros ( score_matrix ) #NEWLINE# traceback_matrix = np . zeros ( shape , dtype = np . int ) #NEWLINE# traceback_matrix += _traceback_encoding [ 'uninitialized' ] #NEWLINE# traceback_matrix [ 0 , : ] = _traceback_encoding [ 'alignment-end' ] #NEWLINE# traceback_matrix [ : , 0 ] = _traceback_encoding [ 'alignment-end' ] #NEWLINE# return ( score_matrix , traceback_matrix )