matrix problem in python code example
Example: python matrix algorithms
import numpy
x = numpy.array([[1, 2], [4, 5]])
y = numpy.array([[7, 8], [9, 10]])
print ("The element wise square root is : ")
print (numpy.sqrt(x))
print ("The summation of all matrix element is : ")
print (numpy.sum(y))
print ("The column wise summation of all matrix is : ")
print (numpy.sum(y,axis=0))
print ("The row wise summation of all matrix is : ")
print (numpy.sum(y,axis=1))
print ("The transpose of given matrix is : ")
print (x.T)