Q:

Write a NumPy program to compute the inner product of two given vectors

0

Write a NumPy program to compute the inner product of two given vectors

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now