bayespecon.logdet.make_logdet_numpy_fn

bayespecon.logdet.make_logdet_numpy_fn(W_sparse, eigs, method, rho_min=-1.0, rho_max=1.0)[source]

Return a pure-numpy (rho: float) -> float logdet evaluator.

Used for post-sampling log-likelihood Jacobian computation (outside any PyMC/PyTensor graph context). Mirrors make_logdet_fn() but returns a plain Python callable instead of a PyTensor expression.

Parameters:
W_sparse : scipy.sparse matrix

Row-standardised n×n spatial weights matrix.

eigs : np.ndarray, optional

Optional pre-computed real eigenvalues of W.

method : str or None

Same as make_logdet_fn(). None auto-selects via _auto_logdet_method().

rho_min : float, default -1.0

Lower bound (used for chebyshev/spline precomputation).

rho_max : float, default 1.0

Upper bound.

Returns:

Function (rho: float) -> float computing log|I - rho*W|.

Return type:

callable