This page performs a matrix multiplication and dot product:
Matrix multiplication/dot product |
Example
Code
An outline of the code is:
import numpy import sys g=[5,7,8] h=[[6,2,3],[1,3,5],[5,3,8]] def multi(m, g): en = numpy.multiply(m, g) return en def dot(m, g): en = numpy.dot(m, g) return en print ("Input:\n",g) print ("Input:\n",h) print ("-----------") res=multi(g,h) print ("Multiply:") print (res)