Write a Python program to print euclidean distance between two array/ vectors


Topic: Write a Python program to print euclidean distance between two array/ vectors

Solution

import numpy as np
a = np.array([78, 84, 87, 91, 76])
b = np.array([92, 83, 91, 79, 89])
dist = np.linalg.norm(a-b)
print('Differnce in performance between A and B : ', dist)



List all Python Programs