Write a NumPy program to compute the inner product of two given vectors
- برمجة بايثون
- 2021-09-11
- mhanasmh00489829403
الأجوبة
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
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال