bayespecon.logdet.make_logdet_numpy_vec_fn

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

Return a vectorized numpy (rho_arr: np.ndarray) -> np.ndarray logdet evaluator.

Companion to make_logdet_numpy_fn() for batch evaluation over an array of posterior draws without a Python loop. Each supported method uses an array-native implementation.

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_numpy_fn().

rho_min : float, default -1.0

rho_max : float, default 1.0

Returns:

Function (rho_arr: np.ndarray) -> np.ndarray of shape (G,).

Return type:

callable