scipy/scipy — pull request #3516 by larsmans (2014-04-01 21:35:30+00:00)
Title: DOC improve scipy.sparse docstrings

Here are three patches for scipy.sparse's documentation; they can be all pulled, or you may cherry-pick from them.

* The first warns about constructing a LIL matrix. This **quadratic time** operation is currently advertised as "efficient" in the docstring. I just answered [yet another SO question](http://stackoverflow.com/q/22796118/166749) amounting to "why does constructing a LIL matrix of 10k×10k take hours to run?"
* The second replaces all mentions of `todense` by `toarray`. The former returns the dreaded `np.matrix` class, which causes a lot of pain for the scikit-learn developers, and probably others. We have to educate all our contributors about using `toarray`.
* The third is an example of how to construct a CSR matrix incrementally. This is a recipe that I find myself reinventing over and over. It should give the user some more feel for how a CSR matrix is laid out, something that was previously hard to grasp from the docs.