Write a NumPy program to compute the inner product of two given vectors
import numpy as np x = np.array([4, 5]) y = np.array([7, 10]) print("Original vectors:") print(x) print(y) print("Inner product of said vectors:") print(np.dot(x, y))
Sample Output:
Original vectors: [4 5] [ 7 10] Inner product of said vectors: 78
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer