sparsax.umf_solve_factor

sparsax.umf_solve_factor(token, b, trans=False)[source]

Solve A x = b (or A^T x = b) using a pre-computed UMFPACK factor.

The UMFPACK counterpart of lu_solve_factor(). Reuses the numeric factor held in token (from umf_factor()): triangular solves only, no factorization. The factor is not consumed. Not differentiable.

Parameters:
token

token from umf_factor() (an opaque int64[2] array).

b

[n] or [n, n_rhs] float64 — right-hand side(s).

trans=False

if True, solve A^T x = b (the adjoint); otherwise A x = b.

Returns:

x with the same shape as b.

Note

vmap(umf_solve_factor, in_axes=(None, 0)) reuses one factor across a batch of right-hand sides — the Krylov-recurrence shape (one factor, m+1 solves), run as one multi-column solve. vmap(umf_factor) then vmap(umf_solve_factor) (both batched) gives one factor per batch element. The two nest in either order, as one native call.