I have two points in 3D:
(xa, ya, za) (xb, yb, zb)
And I want to calculate the distance:
dist = sqrt((xa-xb)^2 + (ya-yb)^2 + (
There's a function for that in SciPy. It's called Euclidean.
Example:
from scipy.spatial import distance a = (1, 2, 3) b = (4, 5, 6) dst = distance.euclidean(a, b)