sparsax.umf_factor

sparsax.umf_factor(Ai, Aj, Ax, n)[source]

Factor general (non-symmetric) A once via UMFPACK, return a token.

The UMFPACK counterpart of lu_factor(). The token is an opaque int64[2] array carrying a strong reference to a UMFPACK numeric factor held in the extension’s token table; pass it to umf_solve_factor() and umf_logdet_factor() to issue an unbounded sequence of solves and a logdet against the same factor. The per-pattern LRU cannot evict the factor while the token is live.

Not differentiable. Use umf_solve() when gradients are needed.

Parameters:
Ai

[n_nz] int32 — COO row/column indices (full matrix).

Aj

[n_nz] int32 — COO row/column indices (full matrix).

Ax

[n_nz] float64 — COO values.

n

matrix dimension (static Python int).

Returns:

An opaque int64[2] token. Not meant to be inspected; pass to umf_solve_factor() / umf_logdet_factor().