scipy/scipy — pull request #4074 by larsmans (2014-10-14 20:24:51+00:00)
Title: Support LinearOperator as input to svds

This is work in progress, but I'm submitting it now to get some help. I want to support `LinearOperator` arguments in `scipy.sparse.linalg.svds`, with the goal of performing PCA on sparse matrices. As you might know, PCA is SVD on a mean-centered matrix X - μ; the mean-centering is problematic since it destroys sparsity and my matrices don't fit in memory in dense format. Representing X - μ as a composite `LinearOperator` solves this problem.

What I have so far: working truncated SVD on `LinearOperator`.

What doesn't work:

* getting the smallest singular values;
* passing an initial vector `v0` to `svds`. This reports `0-th dimension must be fixed to 18 but got 21` and crashes with

```error: failed in converting 10th argument `workd' of _arpack.dsaupd to C/Fortran array```

I've no idea what that means. Maybe some Fortranista can help me out; otherwise, would it be acceptable to offer only partial functionality for `LinearOperator` input?