pymel.util.arrays.dist

dist(a, b, axis=None)

dist(a, b[, axis=(axis0, axis1, ...)]) –> float or Array

Returns the distance between a and b, ie length(b-a, axis)

>>> A = Array([[0.5, 0.5, -0.707],[0.707, -0.707, 0.0]])
>>> print A.formated()
[[0.5, 0.5, -0.707],
 [0.707, -0.707, 0.0]]
>>> B = Array([[0.51, 0.49, -0.71],[0.71, -0.70, 0.0]])
>>> print B.formated()
[[0.51, 0.49, -0.71],
 [0.71, -0.7, 0.0]]
>>> length(B-A)
0.016340134638368205
>>> dist(A, B)
0.016340134638368205
>>> dist(A, B, axis=(0, 1))
0.016340134638368205
>>> dist(A, B, axis=0)
Array([0.0144568322948, 0.00761577310586])
>>> dist(A, B, axis=1)
Array([0.0104403065089, 0.0122065556157, 0.003])