[SciPy-user] determinant of a sparse matrix

Nathan Bell wnbell@gmail....
Sun Dec 21 06:47:33 CST 2008

On Sat, Dec 20, 2008 at 8:32 AM, Giampaolo Cuoghi <jpaul74@gmail.com> wrote:
> Hi everybody,
> I'm using scipy for quantum mechanical computation, in particular for
> solve sparse linear system Ax=b.
> In a particular problem I haven't to solve the linear system Ax=b (with
> A=sparse matrix) but only compute the determinant of A, and compare it
> with zero.
> Is it possible, in scipy, the computation of the determinant of a sparse
> matrix?
> I've tried to use: linalg.det(A.todense()) but this function use a lot
> of memory.

There is no direct support for sparse determinants.  Your use of the
sparse LU decomposition is probably the best approach.

Nathan Bell wnbell@gmail.com

More information about the SciPy-user mailing list