Source Code:
(back to article)
import numpy as np # define two points point1 = np.array([1, 2, 3]) point2 = np.array([4, 5, 6]) # calculate Euclidean distance distance = np.linalg.norm(point1 - point2) print(distance)
Result:
Report an issue