#NEWLINE# def _init_mat( nrows , ncols , ins_cost , del_cost ) : #NEWLINE# #INDENT# mat = np . empty ( ( nrows , ncols ) ) #NEWLINE# mat [ 0 , : ] = ( ins_cost * np . arange ( ncols ) ) #NEWLINE# mat [ : , 0 ] = ( del_cost * np . arange ( ins_cost ) ) #NEWLINE# return mat