[Numpy-discussion] Distance Formula on an Array

Ian Mallett geometrian@gmail....
Sat Apr 25 13:50:11 CDT 2009


I have an array sized n*3.  Each three-component is a 3D position.  Given
another 3D position, how is the distance between it and every
three-component in the array found with NumPy?

So, for example, if the array is:
And the position is:
I need this array out:
(Just a simple Pythagorean Distance Formula)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090425/54f617b0/attachment.html 

More information about the Numpy-discussion mailing list