On Mon, Jan 10, 2011 at 5:09 PM, EMMEL Thomas <thomas.em...@3ds.com> wrote: > To John: > >> Did you try larger arrays/tuples? I would guess that makes a significant >> difference. > > No I didn't, due to the fact that these values are coordinates in 3D (x,y,z). > In fact I work with a list/array/tuple of arrays with 100000 to 1M of > elements or more. > What I need to do is to calculate the distance of each of these elements > (coordinates) > to a given coordinate and filter for the nearest.
Note that for this exact problem, there are much better methods than brute force (O(N^2) for N vectors), through e.g. kd-trees, which work very well in low-dimension. This will matter much more than numeric vs numpy cheers, David _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion