tfm.optimization.math.dist

Return the Euclidean distance between two points p and q.

The points should be specified as sequences (or iterables) of coordinates. Both inputs must have the same dimension.

sqrt(sum((px - qx) ** 2.0 for px, qx in zip(p, q)))