[Numpy-discussion] Fastest distance matrix calc
Tue Apr 17 10:57:30 CDT 2007
Matthieu Brucher wrote:
> you can probably use numpy.hypot(v-y) to speed this up more...
> Tried it today, hypot takes two arguments :(
> Is there a function that does the square root of the sum of squares ?
then maybe you want:
numpy.hypot(v-y,v-y), though you should probably make a temporary v-y,
so you dont' make two of them.
I've been assuming that hypot is written in C, rather than just a
convenience function, but it it's the later, then it won't help here.
Christopher Barker, Ph.D.
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
More information about the Numpy-discussion