[Numpy-discussion] Fastest distance matrix calc
Christopher Barker
Chris.Barker at noaa.gov
Tue Apr 17 11:57:30 EDT 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.
-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.Barker at noaa.gov
More information about the NumPy-Discussion
mailing list