scikit-learn/scikit-learn — pull request #1006 by vene (2012-08-09 16:49:00+00:00)
Title: WIP: Speed up euclidean_distances with Cython

`euclidean_distances` usually pops up near the top as cumulative time in every profiler output that uses it. (I'm talking about our new toy in http://jenkins-scikit-learn.github.com/scikit-learn-speed/) so optimizing it sounds like a good idea.

Here is my first go. I'm new at writing cython so feedback is highly appreciated. I have a sinking feeling that I'm copying around memory when I don't want that.

Here is a hackish benchmark script: https://gist.github.com/3305769

I have intentionally not included the .c file in this PR, so the commits will be lighter until this is done.

**TODO**:

- fast CSR dot product
- optimize the `Y=None` case

P.S. be gentle, I'm typing with a broken finger :)