Answers for "numpy vector multiplication"

1

numpy vector multiplication

a = np.array([[ 5, 1 ,3], 
              [ 1, 1 ,1], 
              [ 1, 2 ,1]])
b = np.array([1, 2, 3])
print a.dot(b)
array([16, 6, 8])
Posted by: Guest on October-17-2021
1

how to do element wise multiplication in numpy

numpy.multiply(arr1, arr2)
Posted by: Guest on September-05-2020

Python Answers by Framework

Browse Popular Code Answers by Language