[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Need Help with Distance Algorithm in Numeric
Ooh, interesting! And what if I wanted to save the index of the entry in
the second array, and the actual distance, instead of the values
themselves? So that the final answer would be:
[(1, dist0),
(0, dist1),
(4, dist2)]
Where on the first line, 1 is the index to [20, 20, 20], and 'dist0' is
the distance between [10, 20, 30] and its nearest neighbor [20, 20, 20],
etc.
I have this all worked out in non-Numeric code, and I really appreciate
your help with converting it to Numeric!