In this python numpy program, we will multiply two vectors using NumPy.
Steps to solve the program
- Import the numpy library as np.
- Create two arrays using np.array().
- Multiply two arrays using * .
- Print the output.
import numpy as np
x = np.array([4,2,8])
y = np.array([7,3,5])
print(x*y)
Output :
[28 6 40]