[SciPy-User] SciPy and Recursion

Sebastian Haase seb.haase at gmail.com
Mon Feb 28 03:56:41 EST 2011


Gaël,
could you explain, what you mean by suboptimal!?
Do mean speed-wise ?
I had a longish thread on the numpy list recently, where I was trying
to gain speed using OpenMP and/or SSE.
And cdist turned out to as fast as my (best) C implementation (for
less than 2-3 threads).

Thanks,
Sebastian Haase


On Sat, Feb 26, 2011 at 11:53 PM, Gael Varoquaux
<gael.varoquaux at normalesup.org> wrote:
> On Sat, Feb 26, 2011 at 02:32:59PM -0800, David Baddeley wrote:
>> now got scipy running - you're going to want:
>
>> dist_list = sp.distance.cdist(cluster_shifted, xyz.reshape((-1, 3)))
>
> By the way, for l2 distance, this function is very suboptimal. You might
> want to use the code from scikits.learn that does the same thing:
> https://github.com/scikit-learn/scikit-learn/blob/master/scikits/learn/metrics/pairwise.py
>
> If you don't want to depend on the scikit, you can just grab that file:
> it doesn't depend on anything else.
>
> Gaël
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



More information about the SciPy-User mailing list