Lou Pecora wrote: > Maybe I'm missing something simple, but if your array of 2D points is > static,
well, not quite. > a KD tree for 2D nearest neighbor seems like over kill. You > might want to try the simple approach of using boxes of points to > narrow things down by sorting on the first component. yeah, we'll probably do something like that if we have to write the code ourselves. At the moment, we're using geohash: http://pypi.python.org/pypi/Geohash/ (this is for points on the earth) and it's working OK. I was just hoping kdtree would work out of the box! > where for a > static data set it can match KD trees in speed Why does it have to be static -- it doesn't look hard to insert/remove points. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion