g = a - b. #Subtraction
array([[-0.5,0. ,0.], [-3. , -3. , -3. ]])
np.subtract(a,b) #Subtraction
b + a #Addition
array([[ 2.5, 4. , 6.],[5. ,7. ,9. ]])
np.add(b,a) #Addition
a/b #Division
array([[0.66666667,1. ,1.],[0.25 ,0.4 ,0.5 ]])
np.divide(a,b) #Division
a * b #Multiplication
array([[1.5, 4. ,9.],[ 4. , 10. , 18. ]])
np.multiply(a,b) #Multiplication
np.exp(b) #Exponentiation
np.sqrt(b) #Square root
np.sin(a) #Print sines of an array
np.cos(b) #Elementwise cosine
np.log(a)#Elementwise natural logarithm
e.dot(f) #Dot product
array([[7.,7.],[7.,7.]])