scipy/scipy — pull request #3963 by jnothman (2014-09-04 00:02:43+00:00)
Title: sparse matrix .resize() methods for all but DIA

This follows the semantics of `dok_matrix.resize()` (which differs from `np.resize` and `np.ndarray.resize`), providing resize functions for all formats but `dia_matrix`. These are useful when one is populating a matrix without predetermined shape, for example.

As well as the `resize` method, these are accessible by setting `A.shape = (m, n)`, which was previously silently broken for LIL (and obscurely called reshape).