[SciPy-user] sparse behaviour?
A. M. Archibald
peridot.faceted at gmail.com
Mon Oct 9 23:29:32 EDT 2006
On 09/10/06, Stefan van der Walt <stefan at sun.ac.za> wrote:
> Currently, scipy.cov calls numpy.cov, which knows nothing about sparse
> matrices. I don't think there is any reason why it can't be done,
> it's just that no one has taken the time to implement it.
There are two ways to fix this: just convert the matrix into a dense
matrix and call numpy.cov, or actually implement a covariance-matrix
algorithm for sparse matrices. I would argue *against* doing the
first: if a user is using sparse matrices, they have a reason, whether
because dense matrices would overload memory, or because sparse
algorithms are vastly faster, and secretly exploding their matrix to a
dense one is likely to be confusing and unwanted.
A. M. Archibald
More information about the SciPy-User
mailing list