import numpy a = numpy.array((xa,ya,za)) b = numpy.array((xb,yb,zb)) diagDist = numpy.linalg.norm(a-b)