scikit-learn/scikit-learn — pull request #2426 by larsmans (2013-09-07 14:46:02+00:00)
Title: [MRG] SGD Cython improvements

Here are some safe bits from #2419, which can be pulled without waiting for my threading experiments.

* nogil declarations where possible (but no with nogil blocks, since the performance benefit of those is not clear)
* use BLAS where appropriate
* replaced DOUBLE by double, INTEGER and int32 by int/np.intc, since that's the type used by scipy.sparse
* explicit checks that dataset dims don't exceed INT_MAX
* replaced an np.all by an explicit loop (npymath library for C99 isfinite)

I also cleaned up the code a little bit (e.g. `min` and `max` no longer need to be defined for current Cython).