[Numpy-discussion] Fastest distance matrix calc
Robert Kern
robert.kern@gmail....
Tue Apr 17 11:08:10 CDT 2007
Christopher Barker wrote:
> 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.
It is written in C, but it doesn't do what you want.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion
mailing list