scikit-learn/scikit-learn — comment on commit 872e70d9b715be074aa761cbd9c40e29afd64d4f
File:  line 0
By larsmans:

I just tried and you can't take the `log` of a sparse matrix. You can take the log of the non-zero elements, but that leaves the question what to do with the zeroes... that wouldn't slow things down in the dense case, except for a single if-then-else and a call to `issparse` :)