sparsax.lu_slogdet¶
- sparsax.lu_slogdet(Ai, Aj, Ax, n)[source]¶
Sign and log-absolute-determinant of a sparse matrix via KLU.
lu_logdet()with the sign that its absolute value drops, as innumpy.linalg.slogdet(). The sign shows when a spatial parameter has crossed a singularity:det(I - rho W)is positive atrho = 0and changes sign each timerhopasses the reciprocal of a real eigenvalue ofW. Shares the factor cache withlu_solve(). Not differentiable.- Parameters:¶
- Ai¶
as in
lu_logdet().- Aj¶
as in
lu_logdet().- Ax¶
as in
lu_logdet().- n¶
as in
lu_logdet().
- Returns:¶
(sign, logabsdet), each a float64 scalar;signis 1.0 or -1.0.- Raises:¶
Exception – if
Ais singular or holds a non-finite value.set_options(on_failure="nan")returns NaN for both instead.