OpenSource For You

Optimisati­ons

-

:Hll, as wH Fan sHH IrRP WKH F3rRfilH RuWSuW, WKH IunFWLRns lenI r~nge, and r~ndom are called the most number of times— due to which I can make the following optimisati­ons in my mult function: def mult(matrix1, matrix2): # Matrix multiplica­tion if len(matrix1[0]) != len(matrix2):

print 'Matrices must be m*n and n*p to multiply!'

Newspapers in English

Newspapers from India