Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Capability index: GeoNumerics

Layers: GeoStack · GeoNumerics · GeoML · GeoModels.

Every public name in the libraries geostack builds on, each listed once under the shortest module path that exports it, with the first sentence of its docstring. Search this page before writing a loader, a model, a training step or a helper in a script or a notebook: if what you need is here, use it; if it is almost here, extend it where it lives. Regenerate with make capabilities after changing a public API (tests/test_capabilities.py checks it is current).

This page is the GeoNumerics layer. It imports no other layer.

Listed at gaussx 0.6.5, finitevolx 0.0.47, spectraldiffx 0.1.1, functax 0.0.6, argminax 0.0.6, integrix 0.0.5.

Upstream: gaussx

Structured linear algebra and Gaussian primitives on lineax.

gaussx

NameKindWhat it does
AbstractIntegratorclassProtocol for Gaussian integral approximation.
AbstractLikelihoodclassBase class for likelihood functions with optional analytical ELL.
AbstractLogdetStrategyclassProtocol for log-determinant strategies.
AbstractMultivariateNormalclassCommon surface of MultivariateNormal and MultivariateNormalPrecision.
AbstractPreconditionerclassProtocol for preconditioners producing an approximate inverse.
AbstractSketchclassA random sketching matrix S∈Rd×mS \in \mathbb{R}^{d \times m}, sampled once.
AbstractSolveStrategyclassProtocol for linear solve strategies.
AbstractSolverStrategyclassProtocol for solver strategies that pair solve + logdet.
AnalyticalPsiStatisticsclassProtocol for kernels with closed-form Ψ statistics.
AssumedDensityFilterclassKL-optimal Gaussian projection via moment matching.
AutoSolverclassAutomatic solver selection based on operator type and size.
BBMMSolverclassCG solve and SLQ logdet with BBMM’s defaults (Gardner et al. 2018).
BYM2GMRFclassThe BYM2 pair (b,u∗)(b, u^\ast) (Riebler et al., 2016), with its exact density.
BernoulliLikelihoodclassBernoulli likelihood with logit link.
BinomialLikelihoodclassBinomial likelihood with logit link.
BlockDiagclassBlock diagonal operator diag(A₁, A₂, …, Aₖ).
BlockTriDiagclassBlock-tridiagonal operator with a symmetric off-diagonal band.
CGSolverclassIterative CG solver with stochastic log-determinant.
CURclassCUR decomposition A≈C U RA \approx C\,U\,R, C=A:,JC = A_{:,J}, R=AI,:R = A_{I,:}.
CapacitanceSolverclassSolve a base system subject to homogeneous point constraints.
ChandrupatlaclassChandrupatla’s hybrid inverse-quadratic / bisection root finder.
ColumnIDclassColumn interpolative decomposition A≈A:,J XA \approx A_{:,J}\,X.
ComposedSolverclassMix-and-match solve and logdet from different strategies.
ConstantSDEclassState-space representation of a constant kernel.
ConstrainedGMRFclassA GaussianMRF conditioned on hard linear constraints Acx=eA_cx = e.
CosineSDEclassState-space representation of the cosine kernel.
CubatureIntegratorclassThird-order spherical-radial cubature.
DAREResultclassResult of DARE solver.
DenseFallbackWarningclassWarning emitted when a structured primitive materialises an operator.
DenseLogdetclassDense log-determinant via gaussx structural dispatch.
DenseSolverclassDense solver strategy using gaussx structural dispatch.
DiagonalizedOperatorclassLinear operator A x = V⁻¹(Λ ⊙ V x) given by a transform pair.
EigenDecompositionclassPrecomputed eigendecomposition A = V diag(λ) V⁻¹ of a square matrix.
EmissionModelclassObservation (emission) model wrapping a linear observation matrix.
FifthOrderCubatureIntegratorclassFifth-order fully symmetric cubature (McNamee & Stenger).
FilterStateclassOutput of kalman_filter.
GaussHermiteIntegratorclassGauss-Hermite quadrature integrator.
GaussianExpFamclassGaussian in natural (exponential family) parameters.
GaussianLikelihoodclassGaussian likelihood log N(y | f, noise_var * I).
GaussianMRFclassGaussian Markov random field x∼N(μ,Q−1)x \sim \mathcal N(\mu, Q^{-1}).
GaussianSitesclassTime-varying Gaussian likelihood sites in natural parameterization.
GaussianSketchclassGaussian sketch: i.i.d. entries Sij∼N(0,1/d)S_{ij} \sim \mathcal{N}(0, 1/d).
GaussianStateclassGaussian distribution as (mean, covariance operator) pair.
HeteroscedasticGaussianLikelihoodclassHeteroscedastic Gaussian likelihood with input-dependent noise.
IndefiniteSLQLogdetclassStochastic log|det(A)| for symmetric (possibly indefinite) operators.
IntegratedWienerSDEclassState-space representation of an integrated Wiener process.
InterpolatedOperatorclassStructured Kernel Interpolation: K \approx W K_{uu} W^T.
IntrinsicGMRFclassImproper N(μ,(τR)+)\mathcal N(\mu, (\tau R)^+) on the complement of ker⁡R\ker R.
JacobiPreconditionerclassDiagonal preconditioner M^{-1} = diag(1 / |diag(A)|).
KeyedSolverclassBind a PRNG key to a strategy’s stochastic log-determinant (gh-384).
KroneckerclassKronecker product operator A₁ ⊗ A₂ ⊗ … ⊗ Aₖ.
KroneckerSumclassKronecker sum A \oplus B = A \otimes I_b + I_a \otimes B.
KroneckerSumSqrtclassSymmetric square root of A \oplus B via per-factor eigenvectors.
LGSSMclassLinear-Gaussian state-space model as a density over (T, M).
LGSSMFactoryclassCallable obs_mask -> MaskedLGSSM, for conditional use.
LOOResultclassResult of leave-one-out cross-validation.
LOVECacheclassCached rank-k Lanczos approximation of K^{-1}.
LSMRSolverclassLSMR iterative least-squares solver (Fong & Saunders 2011).
LaplaceResultclassThe Gaussian approximation N(x^,H−1)\mathcal N(\hat x, H^{-1}) at the mode.
LinearizedSDEclassLinear surrogate dx=(Atx+bt) dt+Qt1/2 dWdx = (A_t x + b_t)\,dt + Q_t^{1/2}\,dW of an SDE.
LineaxSolverclassA lineax solver as a gaussx solve strategy.
LowRankUpdateclassLow-rank update operator L + U diag(d) Vᵀ.
LowerBlockTriDiagclassLower triangular block-bidiagonal Cholesky factor.
MINRESSolverclassMINRES solver for symmetric (possibly indefinite) systems.
MarkovGaussianclassChain-Markov Gaussian over x0:T−1x_{0:T-1} as a density over (T, d).
MaskedLGSSMclassLGSSM whose log_prob marginalises unobserved channels exactly.
MaskedOperatorclassRow/column-masked view of a base operator.
MaternSDEclassState-space representation of the Matern kernel.
MomentMatchResultclassTilted log-normaliser and its derivatives w.r.t. the cavity mean.
MonteCarloIntegratorclassMonte Carlo moment matching: sample, propagate, compute moments.
MultivariateNormalclassMultivariate normal parameterized by a lineax linear operator.
MultivariateNormalPrecisionclassMultivariate normal parameterized by a precision (inverse covariance) operator.
NegativeBinomialLikelihoodclassNegative-binomial likelihood with log link (NB2, a gamma-Poisson mixture).
NystromLogdetclassNyström-preconditioned log-determinant of A+μIA + \mu I (Wenger et al., 2022).
NystromPreconditionerclassRandomized Nyström preconditioner for A + μ I.
OperatorPreconditionerclassUse an externally supplied approximate inverse as a preconditioner.
OrthonormalSketchclassGaussian sketch with orthonormal rows, SS⊤=IdS S^\top = I_d.
PartialCholeskyPreconditionerclassPreconditioner from a pivoted partial Cholesky factor.
PeriodicSDEclassState-space representation of the periodic (MacKay) kernel.
PoissonLikelihoodclassPoisson likelihood with log link.
PreconditionedCGSolverclassCG solver with pivoted partial Cholesky preconditioner.
PredictionCacheclassCached training solve (and factor) for amortized predictions.
ProductSDEclassProduct of two SDE kernels via Kronecker composition.
PropagationResultclassOutput of uncertainty propagation through a nonlinear function.
QuasiPeriodicSDEclassQuasi-periodic kernel: product of Matern and Periodic SDE.
RootDecompositionclassTall factor R with R Rᵀ ≈ A semantics.
RowSamplingSketchclassWeighted row-sampling sketch.
SDEKernelclassAbstract base class for state-space kernel representations.
SDEParamsclassContinuous-time SDE parameters for a linear SDE.
SLQLogdetclassStochastic log-determinant via Lanczos quadrature (SLQ).
SLRResultclassLinear-Gaussian surrogate produced by statistical linear regression.
SRHTSketchclassSubsampled randomized Hadamard transform sketch.
SVDLowRankUpdateclassDeprecated subclass of LowRankUpdate with orthonormal=True.
SketchAndPrecondLSMRclassSketch-and-precondition LSMR for tall least squares (Rokhlin & Tygert, 2008).
SoftmaxLikelihoodclassSoftmax (categorical) likelihood for multi-class classification.
SparseCholeskyFactorclassSparse Cholesky factor P Q Pᵀ = L Lᵀ on a static symbolic pattern.
SparseCholeskySolverclassExact solve / logdet / diag_inv through a sparse Cholesky factor.
SparseOperatorclassSparse matrix with a static SparsityPattern and traced values.
SparseSignSketchclassSparse sign sketch (sparse Johnson-Lindenstrauss transform).
SparsityPatternclassStatic, hashable sparsity pattern of a (m, n) matrix.
SpectralFunctionclassf(B) for a symmetric B with a factored eigenbasis.
StudentTLikelihoodclassStudent-t likelihood for robust regression.
SumKroneckerclassDeprecated alias for SumOfKroneckers.
SumKroneckerSqrtclassDeprecated alias for SumOfKroneckersSqrt (gh-297).
SumOfKroneckersclassSum of Kronecker products Σ_k A_k \otimes B_k.
SumOfKroneckersSqrtclassLazy Lanczos square-root operator for SumOfKroneckers covariances.
SumSDEclassSum of SDE kernels via block-diagonal composition.
SymbolicCholeskyclassSymbolic Cholesky factor of a symmetric sparsity pattern.
TaylorIntegratorclass1st or 2nd order Taylor expansion for uncertainty propagation.
ToeplitzclassSymmetric Toeplitz matrix from its first column.
ToeplitzCholeskyclassCirculant-embedding sample factor for a symmetric positive Toeplitz matrix.
UDLDecompositionclassBanded factorisation Λ=UD~U⊤\Lambda = U \tilde{D} U^{\top} of a BlockTriDiag.
UnscentedIntegratorclassUnscented transform: deterministic sigma points.
UpperBlockTriDiagclassUpper triangular block-bidiagonal (transpose of LowerBlockTriDiag).
add_jitterfunctionAdd diagonal jitter for numerical stability: A + eps * I.
ar1_precisionfunctionPrecision of a stationary AR(1) process with marginal precision τ.
as_diagonalizedfunctionExpress operator as one DiagonalizedOperator, if possible.
as_linear_operatorfunctionWrap a raw matvec callable as a tagged lineax operator.
base_conditionalfunctionDeprecated: use sparse_conditional (note K_xz = K_mn.T).
besag_structurefunctionValidate a graph Laplacian as a Besag (ICAR) structure matrix.
block_diagonal_tagconstantblock_diagonal_tag
block_tridiagonal_tagconstantblock_tridiagonal_tag
blr_diag_updatefunctionDiagonal natural parameter BLR update step.
blr_full_updatefunctionFull-rank natural parameter BLR update step.
build_prediction_cachefunctionSolve K_y alpha = y and cache the result.
bym2_precisionfunctionJoint precision of the BYM2 pair (b, u*) (Riebler et al., 2016).
cavity_distributionfunctionCompute EP cavity distribution by removing a site.
cavity_from_marginalfunctionCompute cavity distribution by removing a site from the marginal.
choleskyfunctionCompute Cholesky factor L such that A = L L^T.
cholesky_logdetfunctionCompute log|A| from Cholesky factor L where A = L Lᵀ.
circulantfunction(Block-)circulant operator from its first column.
circulant_from_symbolfunction(Block-)circulant operator from its DFT symbol.
collapsed_elbofunctionCollapsed ELBO (Titsias bound) for sparse GP regression.
column_idfunctionRandomized column interpolative decomposition (Voronin & Martinsson, 2017).
compute_psi_statisticsfunctionCompute Ψ statistics, dispatching to analytical or numerical.
conditionalfunctionCompute p(x_A | x_B = b) from a joint Gaussian p(x_A, x_B).
conditional_interpolatefunctionTwo-filter fusion at t from a filtered state and a backward message.
conditional_variancefunctionPredictive variance: Schur complement diagonal plus optional variational correction.
cost_expectationfunctionCompute E[Cost(f(x), target)] where x ~ N(mu, Sigma).
cov_transformfunctionCovariance propagation through a linear map: J @ Sigma @ J^T.
create_gridfunctionCreate a regular grid from per-dimension sizes and bounds.
cubature_pointsfunctionSpherical-radial cubature points and weights.
cubic_interpolation_weightsfunctionCompute cubic interpolation indices and weights for SKI.
curfunctionRandomized CUR decomposition (Voronin & Martinsson, 2017, §4).
cvi_update_sitesfunctionNatural gradient update for CVI sites.
damped_natural_updatefunctionDamped update in natural parameter space.
darefunctionSteady-state Kalman filter covariance and gain (the filtering DARE).
diagfunctionExtract the diagonal of an operator as a 1D array.
diag_conditional_variancefunctionDiagonal of Schur complement: diag(K_XX - A K_ZX).
diag_invfunctionCompute the diagonal of the inverse of a linear operator.
diagonal_tagconstantdiagonal_tag
discrepancy_step_sizefunctionAdaptive EKI tempering step: the data misfit controller.
discrete_lyapunov_solvefunctionSolve the discrete Lyapunov equation P - G P G^T = Q.
discretize_mfdfunctionDiscretise a linear SDE by matrix-fraction decomposition.
discretize_mfd_sequencefunctionVectorised gaussx.discretize_mfd over a vector of time steps.
eigfunctionCompute eigenvalues and eigenvectors.
eigh_generalizedfunctionSolve Av=λBvA v = \lambda B v for symmetric AA and symmetric PSD BB.
eigvalsfunctionCompute eigenvalues only.
eki_stepfunctionOne ensemble Kalman inversion (EKI) update.
elbofunctionEvidence lower bound (ELBO).
enkf_analysisfunctionStochastic (perturbed-observation) ensemble Kalman analysis step.
ensemble_covariancefunctionEmpirical covariance from an ensemble as a low-rank operator.
ensemble_cross_covariancefunctionCross-covariance between two ensemble sets.
ensemble_kalman_gainfunctionKalman gain from an ensemble and its image in observation space.
ep_tilted_momentsfunctionMoments of the scalar EP tilted distribution, elementwise over a batch.
estimate_spectral_boundsfunctionEstimate (λmin⁡,λmax⁡)(\lambda_{\min}, \lambda_{\max}) of a symmetric operator.
etkf_transformfunctionEnsemble Transform Kalman Filter (ETKF) analysis weights.
euclidean_distancefunctionPairwise Euclidean distances ||a_i - b_j||.
expectation_to_mean_cholfunctionConvert expectation parameters to mean/variance (Cholesky).
expectation_to_naturalfunctionConvert expectation parameters to natural parameters.
expectations_to_ssmfunctionConvert expectation parameters back to SSM marginals.
expected_log_likelihoodfunctionUnified expected log-likelihood with analytical dispatch.
fem_matricesfunctionLumped mass C̃ and stiffness G of P1 elements on a triangle mesh.
fem_projectorfunctionObservation matrix A of P1 interpolation: (A w)_k = Σ_i ψ_i(s_k) w_i.
fifth_order_cubature_pointsfunctionFifth-order fully symmetric cubature points and weights.
fisher_infofunctionFisher information with respect to the mean, Fμ=Σ−1F_\mu = \Sigma^{-1}.
frobenius_normfunctionCompute the Frobenius norm ||A||_F with structural dispatch.
gaspari_cohnfunctionGaspari-Cohn (1999) fifth-order compactly-supported taper.
gauss_hermite_pointsfunctionGauss-Hermite quadrature points and weights.
gauss_klfunctionKL(first ‖ second): KL[q(u) || p(u)] with p(u) = N(0, K).
gauss_newton_precisionfunctionGauss-Newton precision matrix J^T J, optionally plus a prior.
gaussian_entropyfunctionEntropy of a multivariate normal N(mu, Sigma).
gaussian_expected_log_likfunctionExpected log-likelihood E_q[log N(y | f, R)].
gaussian_klfunctionKL(first ‖ second): KL(p || q) between two multivariate normals.
gaussian_log_probfunctionMultivariate normal log-probability.
generalized_variance_scalefunctionGeneralized variance of an intrinsic GMRF (Sørbye & Rue, 2014).
ggn_diagonalfunctionGeneralized Gauss-Newton diagonal approximation.
gradient_expectationfunctionCompute E[nabla f(x)] via Stein’s lemma.
grid_coupling_indicesfunctionFlat indices of masked-out grid cells adjacent to the masked-in region.
grid_datafunctionExpand a grid to the full Cartesian product of grid points.
hadamard_transformfunctionUnnormalized Walsh-Hadamard transform along the last axis.
haversine_distancefunctionPairwise great-circle (haversine) distances on a sphere.
hutchinson_hessian_diagfunctionStochastic Hessian diagonal via Hutchinson with Rademacher probes.
iid_precisionfunctionPrecision τ I of n independent effects with variance 1/τ.
infinite_horizon_filterfunctionInfinite-horizon Kalman filter with fixed steady-state gain.
infinite_horizon_smootherfunctionInfinite-horizon RTS smoother with fixed steady-state gain.
inflate_multiplicativefunctionMultiplicative ensemble inflation about the mean.
inflate_rtppfunctionRelaxation to prior perturbations (RTPP; Zhang et al. 2004).
inflate_rtpsfunctionRelaxation to prior spread (RTPS; Whitaker & Hamill 2012).
invfunctionReturn a lazy inverse operator A^{-1}.
inv_quad_logdetfunctionJoint inverse-quadratic and log-determinant via shared BBMM CG.
is_block_diagonalfunctionCheck whether operator carries the block-diagonal tag.
is_block_tridiagonalfunctionCheck whether operator carries the block-tridiagonal tag.
is_diagonalfunctionRe-exported from lineax.
is_eigen_reduciblefunctionWhether a sum of Kronecker products has the exact two-term reduction.
is_kroneckerfunctionCheck whether operator carries the Kronecker tag.
is_kronecker_sumfunctionCheck whether operator carries the Kronecker sum tag.
is_low_rankfunctionCheck whether operator carries the low-rank tag.
is_lower_triangularfunctionRe-exported from lineax.
is_negative_semidefinitefunctionRe-exported from lineax.
is_positive_semidefinitefunctionRe-exported from lineax.
is_symmetricfunctionRe-exported from lineax.
is_upper_triangularfunctionRe-exported from lineax.
joseph_updatefunctionNumerically stable Joseph-form covariance update.
kalman_filterfunctionKalman filter forward pass via jax.lax.scan.
kalman_gainfunctionCompute Kalman gain K = P @ H^T @ (H @ P @ H^T + R)^{-1}.
kernel_expectationsfunctionCompute kernel expectations Psi_0, Psi_1, Psi_2 for uncertain inputs.
kl_divergencefunctionKL(first ‖ second): KL(q || p) via the Bregman form on natural parameters.
kl_standard_normalfunctionKL(first ‖ second): KL(N(m, S) || N(0, I)).
kronecker_mllfunctionExact marginal log-likelihood for a Kronecker-structured GP.
kronecker_posterior_predictivefunctionPosterior mean and variance for a Kronecker GP at test points.
kronecker_sum_samplefunctionSample from 𝒩(0, A ⊕ B) using per-factor eigendecompositions.
kronecker_sum_solvefunctionSolve a shifted Kronecker-sum system in tensor (unvectorized) form.
kronecker_sum_tagconstantkronecker_sum_tag
kronecker_tagconstantkronecker_tag
laplace_modefunctionMode, Hessian and log-marginal of the Laplace approximation, in precision form.
leave_one_out_cvfunctionLOO-CV via the bordered-system identity.
linear_solvefunctionSolve A x = b through the unified front door.
linearize_sdefunctionOptimal linear drift of a nonlinear SDE along a Gaussian path.
localization_matrixfunctionPairwise Gaspari-Cohn taper rho(dist(a_i, b_j); c).
localized_kalman_gainfunctionEnsemble Kalman gain with Hadamard (Schur-product) localization.
log_likelihood_expectationfunctionCompute E[log p(y_{obs} | f(x))] where x ~ N(mu, Sigma).
log_marginal_likelihoodfunctionGP log marginal likelihood.
log_partitionfunctionLog-partition function A(eta).
logdetfunctionCompute log |det(A)| with structural dispatch.
love_cachefunctionPrecompute a Lanczos approximation of K^{-1} for fast variance.
love_residualfunctionRelative solve residual of a LOVE cache for one cross-covariance.
love_variancefunctionApproximate k_*^\top K^{-1} k_* from a LOVE cache.
love_variance_error_boundfunctionUpper bound on the variance over-estimate of a LOVE cache.
low_rank_plus_diagfunctionConstruct diag(diag) + U diag(d) Vᵀ.
low_rank_plus_identityfunctionConstruct scale * I + U diag(d) Vᵀ.
low_rank_tagconstantlow_rank_tag
lower_triangular_tagconstantlower_triangular_tag
masked_moment_inputsfunctionMake masked observation channels inert in a moment-matched update.
matern_spde_paramsfunctionSPDE parameters (κ, τ, α) of a Matérn field.
matheron_updatefunctionPosterior samples via Matheron’s-rule correction.
mean_chol_to_expectationfunctionConvert mean/variance (Cholesky) to expectation parameters.
mean_chol_to_naturalfunctionConvert mean/variance (Cholesky) to natural parameters.
mean_cov_to_naturalfunctionConvert mean/covariance to natural parameters (operator form).
mean_expectationfunctionCompute E[f(x)] where x ~ N(mu, Sigma).
meanfield_kalman_filterfunctionMean-field Kalman filter over L = D // block_size state blocks.
meanfield_rts_smootherfunctionMean-field RTS smoother over L = D // block_size state blocks.
mixture_quantilefunctionInvert a CDF at one or more quantile levels by bracketed root finding.
mixture_quantile_gaussian_approxfunctionQuantiles of the Gaussian matched to an ensemble’s first two moments.
moment_matchfunctionEP moment matching: tilted log-normaliser and its first two derivatives.
moment_transformfunctionMoment triple of (x, fn(x)) for x Gaussian.
natural_to_expectationfunctionConvert natural parameters to expectation parameters.
natural_to_mean_cholfunctionConvert natural parameters to mean/variance (Cholesky).
natural_to_mean_covfunctionConvert natural parameters to mean/covariance (operator form).
naturals_to_ssmfunctionConvert natural parameters back to SSM parameters.
negative_semidefinite_tagconstantnegative_semidefinite_tag
newton_updatefunctionConvert a Newton step to natural pseudo-likelihood parameters.
nonlinear_kalman_filterfunctionMoment-matched nonlinear Kalman filter.
nonlinear_kalman_predictfunctionOne moment-matched predict step.
nonlinear_kalman_updatefunctionOne moment-matched update step.
nonlinear_rts_smootherfunctionMoment-matched nonlinear Rauch-Tung-Striebel smoother.
nonlinear_rts_stepfunctionOne moment-matched RTS backward step.
oilmm_back_projectfunctionBack-project latent GP predictions to the observation space.
oilmm_projectfunctionProject multi-output data to independent latent GPs via OILMM.
pairwise_marginalsfunctionJoint p(x_k, x_{k+1}) for each consecutive pair.
parallel_kalman_filterfunctionParallel Kalman filter via jax.lax.associative_scan.
parallel_rts_smootherfunctionParallel RTS smoother via reverse jax.lax.associative_scan.
positive_semidefinite_tagconstantpositive_semidefinite_tag
predict_meanfunctionPredictive mean: mu* = K_*f @ alpha.
predict_variancefunctionPredictive variance sigma^2_* = k_** - diag(K_*f K_y^{-1} K_f*).
process_noise_covariancefunctionCompute process noise from stationary covariance.
product_operatorfunctionLazy matmul (A B) v = A (B v).
projectfunctionCompute A_X = K_XZ @ K_ZZ^{-1} via Cholesky solve.
pseudo_logdetfunctionLog pseudo-determinant: the log of the product of the non-zero eigenvalues.
qbfunctionRandomized QB factorisation A≈QBA \approx QB with B=Q⊤AB = Q^\top A.
quadratic_formfunctionCompute x^T A^{-1} x via a single solve.
randomized_eighfunctionPartial eigendecomposition of a symmetric operator by Rayleigh-Ritz.
randomized_nystromfunctionRandomized Nyström approximation A^=UΛ^U⊤\hat A = U\hat\Lambda U^\top of a PSD AA.
randomized_svdfunctionTruncated SVD A≈Udiag⁡(s)V⊤A \approx U \operatorname{diag}(s) V^\top by randomized QB.
range_finderfunctionOrthonormal basis QQ for the dominant range of AA.
riemannian_psd_correctionfunctionRiemannian gradient correction for PSD precision updates.
root_decompositionfunctionCompute a tall factor R such that R Rᵀ ≈ A.
root_inv_decompositionfunctionCompute a tall factor R⁻ such that R⁻ (R⁻)ᵀ ≈ A⁻¹.
rp_choleskyfunctionRandomly pivoted partial Cholesky of a PSD matrix A.
rts_interpolatefunctionSmoothed marginal at an unobserved t from filtered and smoothed states.
rts_smootherfunctionRauch-Tung-Striebel backward smoother.
rw1_structurefunctionStructure matrix R = D₁ᵀ W D₁ of a first-order random walk.
rw2_structurefunctionStructure matrix R = D₂ᵀ D₂ of a second-order random walk.
safe_choleskyfunctionCholesky decomposition with adaptive jitter for near-singular matrices.
sample_joint_conditionalfunctionJoint draws of a partitioned Gaussian, and conditional draws from them.
sample_mvnfunctionDraw samples from N(μ,K)\mathcal{N}(\mu, K), dispatching on KK’s structure.
sandwichfunctionReturn A @ P @ A.T exploiting compatible operator structure.
scaled_operatorfunctionLazy scalar multiply (c A) v = c (A v).
schur_complementfunctionSchur complement: K_XX - K_XZ @ K_ZZ^{-1} @ K_ZX.
sde_autocovariancefunctionCompute the stationary autocovariance of an SDE kernel.
sde_kl_divergencefunctionDrift path-KL between a linear and a nonlinear SDE along a Gaussian path.
selected_inversefunctionThe band of Σ = Q⁻¹ for a symmetric positive-definite BlockTriDiag.
sigma_pointsfunctionUnscented transform sigma points and weights.
site_mean_var_from_naturalfunctionConvert per-site natural parameters to mean/variance.
site_natural_from_tiltedfunctionCompute site natural parameters from tilted and cavity moments.
sites_to_precisionfunctionConvert Gaussian sites to a block-tridiagonal precision.
sketch_and_solvefunctionApproximate least squares from a sketch.
solvefunctionSolve A x = b with structural dispatch.
solve_columnsfunctionSolve A X = B column-by-column via vmap.
solve_matrixfunctionSolve A X = B with a single factorization on the matrix RHS.
solve_rowsfunctionSolve A x = bᵢ for each row bᵢ of a matrix via vmap.
sparse_choleskyfunctionSparse Cholesky factorisation of a symmetric positive-definite operator.
sparse_conditionalfunctionSparse-GP conditional q(f_x) = \int p(f_x | u) q(u) du.
spde_precisionfunctionSPDE precision Q_α = τ² K (C̃⁻¹K)^{α−1} with K = κ²C̃ + G.
spde_precision_gridfunctionSPDE precision on a regular grid: a function of a Kronecker sum.
spingp_log_likelihoodfunctionLog marginal likelihood via sparse inverse GP formulation.
spingp_posteriorfunctionPosterior mean and precision via SpInGP.
sqrtfunctionCompute matrix square root S such that S @ S = A.
sqrt_inv_matmulfunctionCompute A−1/2bA^{-1/2} b via contour-integral quadrature.
sqrt_matmulfunctionCompute A1/2bA^{1/2} b via contour-integral quadrature.
ssm_to_expectationsfunctionConvert SSM marginals to expectation parameters.
ssm_to_naturalsfunctionConvert SSM parameters to natural parameters.
stable_squared_distancesfunctionSquared Euclidean distances with mixed-precision stability.
statistical_linear_regressionfunctionMoment-match a nonlinear conditional to a linear-Gaussian surrogate.
submatrixfunctionExtract A[row_idx, col_idx] without forming the full matrix.
sufficient_statsfunctionCompute sufficient statistics T(x) = [x, x x^T].
sum_of_kroneckers_samplefunctionSample from 𝒩(0, op) with matrix-free Lanczos square roots.
sum_operatorfunctionLazy sum (A + B + …) v = A v + B v + ….
sumkronecker_samplefunctionDeprecated alias for sum_of_kroneckers_sample (gh-297).
svdfunctionCompute the singular value decomposition A = U diag(s) V^T.
svd_low_rank_plus_diagfunctionConstruct diag(diag) + U diag(S) Vᵀ from a truncated SVD.
svgp_variance_adjustmentfunctionCompute the SVGP variance adjustment operator.
symbolic_choleskyfunctionSymbolic analysis of a sparse Cholesky factorisation (host, cached).
symmetric_tagconstantsymmetric_tag
symmetrizefunctionSymmetrize the trailing two axes: 0.5 * (X + X^T).
theta_designfunctionIntegration points and log-weights over hyperparameters θ\theta.
tikhonov_augmentfunctionObservation augmentation for Tikhonov-regularised EKI (TEKI).
to_expectationfunctionDeprecated alias of to_mean_cov.
to_mean_covfunctionConvert natural parameters to the mean and covariance.
to_naturalfunctionDeprecated alias of gaussx.mean_cov_to_natural.
toeplitz_samplefunctionSample from 𝒩(0, Toeplitz(column)) via FFT circulant embedding.
tracefunctionCompute the trace of an operator.
trace_and_diagfunctionJointly estimate the trace and diagonal from one probe pass.
trace_correctionfunctionTrace term in Titsias collapsed ELBO.
trace_productfunctionTrace of a matrix product: tr(A @ B) with structural dispatch.
tridiagonal_solvefunctionSolve a tridiagonal system A x = d.
tridiagonal_solve_batchedfunctionSolve independent tridiagonal systems over leading batch dimensions.
tridiagonal_tagconstanttridiagonal_tag
udl_decompositionfunctionFactorise a symmetric block-tridiagonal precision as UD~U⊤U \tilde{D} U^{\top}.
udl_from_ssm_paramsfunctionBuild the UDLDecomposition of a Gauss-Markov chain’s precision.
udl_to_ssm_paramsfunctionRead the equivalent Gauss-Markov chain off a UDLDecomposition.
uncertain_bgplvm_predictfunctionMulti-output uncertain GP prediction for BGPLVM.
uncertain_gp_predictfunctionPredictive mean and variance for GP with uncertain inputs.
uncertain_gp_predict_mcfunctionMonte Carlo GP prediction with uncertain inputs.
uncertain_svgp_predictfunctionPredictive mean and variance for SVGP with uncertain inputs.
uncertain_vgp_predictfunctionPredictive mean and variance for dense VGP with uncertain inputs.
unit_diagonal_tagconstantunit_diagonal_tag
unwhitenfunctionUnwhiten variational mean: m = L @ m_tilde.
unwhiten_covariancefunctionUnwhiten variational covariance: S = L S̃ Lᵀ.
upper_triangular_tagconstantupper_triangular_tag
variational_elbo_gaussianfunctionUncollapsed (SVGP) ELBO for a Gaussian likelihood.
variational_elbo_mcfunctionMonte Carlo ELBO for non-conjugate likelihoods.
vb_mean_correctionfunctionLow-rank VB correction of the Laplace mean (Van Niekerk & Rue, 2024).
whitened_svgp_predictfunctionWhitened SVGP prediction: mean and variance at test points.
woodbury_solvefunctionStandalone Woodbury identity solve: (L + U diag(D) U^T)^{-1} b.

Upstream: finitevolx

Arakawa C-grid finite-volume operators.

finitevolx

NameKindWhat it does
AB2SolverclassAdams-Bashforth 2nd-order solver (equinox Module).
AbstractForcingclassBase class for forcing operators.
Advection1Dclass1-D advection operator.
Advection2Dclass2-D advection operator.
Advection3Dclass3-D advection operator (horizontal plane per z-level).
ArakawaCGrid1Dclass1-D Arakawa C-grid topology (no metric).
ArakawaCGrid2Dclass2-D Arakawa C-grid topology (no metric).
ArakawaCGrid3Dclass3-D Arakawa C-grid topology (no metric).
ArakawaJacobian2DclassArakawa (1966) Jacobian J(f, g) at T-points, on the full grid.
BiharmonicDiffusion2DclassBiharmonic (∇⁴) diffusion operator on a 2-D Arakawa C-grid.
BiharmonicDiffusion3DclassBiharmonic (nabla^4) diffusion operator on a 3-D Arakawa C-grid.
BoundaryConditionfunctionRe-exported from typing.
BoundaryConditionSetclassApply a different boundary condition on each domain face.
CGInfoclassConvergence diagnostics returned by :func:solve_cg.
CapacitanceSolverclassRe-exported from spectraldiffx.
CartesianGrid1Dclass1-D Cartesian Arakawa C-grid (uniform spacing).
CartesianGrid2Dclass2-D Cartesian Arakawa C-grid (uniform spacing).
CartesianGrid3Dclass3-D Cartesian Arakawa C-grid (uniform spacing).
Coriolis2DclassCoriolis force operator for 2-D Arakawa C-grids.
Coriolis3DclassCoriolis force operator for 3-D Arakawa C-grids.
CurvilinearGrid1Dclass1-D curvilinear C-grid with a uniform metric.
CurvilinearGrid2Dclass2-D curvilinear C-grid with a uniform metric.
CurvilinearGrid3Dclass3-D curvilinear C-grid with a uniform metric.
Difference1DclassFinite-difference operators on a 1-D Arakawa C-grid.
Difference2DclassFinite-difference operators on a 2-D Arakawa C-grid.
Difference3DclassFinite-difference operators on a 3-D Arakawa C-grid.
Diffusion2DclassHorizontal diffusion operator (flux form) on a 2-D Arakawa C-grid.
Diffusion3DclassHorizontal diffusion operator (flux form) on a 3-D Arakawa C-grid.
Dirichlet1DclassApply a Dirichlet value on one domain face.
DirichletHelmholtzSolver2DclassRe-exported from spectraldiffx.
Divergence2DclassDivergence operator on a 2-D Arakawa C-grid.
Energetics2DclassEnergy diagnostics at T-points on a 2-D Arakawa C-grid.
Extrapolation1DclassHigh-order polynomial extrapolation for ghost cells.
FieldBCSetclassDispatch per-face boundary conditions across multiple fields.
ForcingProductclassModulated forcing: F = alpha * F_inner.
ForcingSumclassAdditive composition of forcings: F = F_1 + F_2 + ... + F_n.
ForwardEulerDfxclassForward Euler via the diffrax AbstractSolver interface.
IMEX_SSP2classIMEX-SSP2(2,2,2) solver using diffrax MultiTerm.
Interpolation1Dclass1-D averaging operators on an Arakawa C-grid.
Interpolation2Dclass2-D averaging operators on an Arakawa C-grid.
Interpolation3Dclass3-D averaging operators on an Arakawa C-grid.
KnownValueLiftingclassPre/post-processing wrapper for the lifting trick.
LeapfrogRAFSolverclassLeapfrog with Robert-Asselin filter (equinox Module).
LinearDrag2DclassLinear drag on a 2-D Arakawa C-grid.
LinearDrag3DclassLinear bottom drag on a 3-D Arakawa C-grid.
Mask1DclassUnified Arakawa C-grid mask for a 1-D Cartesian domain.
Mask2DclassUnified Arakawa C-grid mask for a 2-D Cartesian domain.
Mask3DclassUnified Arakawa C-grid mask for a 3-D Cartesian domain.
MixedBCHelmholtzSolver2DclassRe-exported from spectraldiffx.
MixedBCHelmholtzSolver3DclassRe-exported from spectraldiffx.
MomentumAdvection2DclassEnergy-conserving momentum advection on a 2-D Arakawa C-grid.
MomentumAdvection3DclassEnergy-conserving momentum advection on a 3-D Arakawa C-grid.
MultigridSolverclassGeometric multigrid V-cycle solver for the variable-coefficient Helmholtz equation::
Neumann1DclassApply an outward-normal gradient on one domain face.
NeumannHelmholtzSolver2DclassRe-exported from spectraldiffx.
Outflow1DclassApply a one-face outflow boundary condition.
Periodic1DclassApply periodic wrapping on one domain face.
QGPotentialVorticity2DclassQuasi-geostrophic potential vorticity at T-points.
QuadraticDrag2DclassQuadratic bottom drag on a 2-D Arakawa C-grid.
QuadraticDrag3DclassQuadratic bottom drag on a 3-D Arakawa C-grid.
RK2HeunclassHeun’s method (RK2) via Butcher tableau.
RK3SSPclass3rd-order Strong-Stability-Preserving Runge-Kutta.
RK4ClassicclassClassic 4th-order Runge-Kutta.
RayleighDamping2DclassRayleigh damping of a T-point field on a 2-D Arakawa C-grid.
RayleighDamping3DclassRayleigh damping of a T-point field on a 3-D Arakawa C-grid.
Reconstruction1Dclass1-D face-value reconstruction.
Reconstruction2Dclass2-D face-value reconstruction for advective fluxes.
Reconstruction3Dclass3-D face-value reconstruction.
Reflective1DclassApply an even-symmetry reflective boundary on one face.
RegularNeumannHelmholtzSolver2DclassRe-exported from spectraldiffx.
Robin1DclassRobin (mixed) boundary condition: α·u + β·∂u/∂n = γ.
SSP_RK104class4th-order SSP Runge-Kutta with 10 stages (Ketcheson 2008).
SSP_RK2class2nd-order SSP Runge-Kutta (same as Heun).
SemiLagrangianSolverclassSemi-Lagrangian advection solver for diffrax.
Slip1DclassSlip boundary condition for tangential velocity at a solid wall.
SolveDomainclassDerived masks for the lifting trick.
SpectralHelmholtzSolver1DclassRe-exported from spectraldiffx.
SpectralHelmholtzSolver2DclassRe-exported from spectraldiffx.
SpectralHelmholtzSolver3DclassRe-exported from spectraldiffx.
SphericalAdvection2Dclass2-D tracer advection on a spherical Arakawa C-grid.
SphericalAdvection3Dclass3-D tracer advection on a spherical Arakawa C-grid.
SphericalBiharmonicDiffusion2DclassBiharmonic (spherical ∇⁴) diffusion on a 2-D spherical C-grid.
SphericalBiharmonicDiffusion3DclassBiharmonic spherical diffusion on a 3-D Arakawa C-grid.
SphericalDifference2DclassSpherical finite-difference operators on a 2-D Arakawa C-grid.
SphericalDifference3DclassSpherical finite-difference operators on a 3-D Arakawa C-grid.
SphericalDiffusion2DclassHorizontal tracer diffusion (flux form) on a 2-D spherical C-grid.
SphericalDiffusion3DclassHorizontal tracer diffusion on a 3-D spherical Arakawa C-grid.
SphericalDivergence2DclassHorizontal divergence on a 2-D spherical Arakawa C-grid.
SphericalDivergence3Dclass3-D spherical divergence (vmap over z-levels).
SphericalGrid2Dclass2-D Arakawa C-grid on a sphere.
SphericalGrid3Dclass3-D Arakawa C-grid on a sphere.
SphericalLaplacian2DclassSpherical Laplacian on a 2-D Arakawa C-grid.
SphericalLaplacian3Dclass3-D spherical Laplacian (vmap over z-levels).
SphericalMomentumAdvection2DclassEnergy-conserving momentum advection on a 2-D spherical C-grid.
SphericalMomentumAdvection3DclassEnergy-conserving momentum advection on a 3-D spherical C-grid.
SphericalVorticity2DclassVorticity and PV-flux operators on a 2-D spherical Arakawa C-grid.
SphericalVorticity3Dclass3-D spherical vorticity (vmap over z-levels).
SplitExplicitRKSolverclassSplit-explicit barotropic/baroclinic solver.
Sponge1DclassRelax one ghost face toward a background value.
StaggeredDirichletHelmholtzSolver2DclassRe-exported from spectraldiffx.
StencilCapability1DclassDirectional count of contiguous wet neighbours for each 1-D grid cell.
StencilCapability2DclassDirectional count of contiguous wet neighbours for each 2-D grid cell.
StencilCapability3DclassDirectional count of contiguous wet neighbours for each 3-D grid cell.
Strain2DclassStrain diagnostics on a 2-D Arakawa C-grid.
TimeVaryingForcingclassBundle a time-agnostic forcing with time-dependent input fields.
Vorticity2Dclass2-D vorticity and PV-flux operators.
Vorticity3Dclass3-D vorticity operators (horizontal plane per z-level).
WindStress2DclassSurface wind-stress forcing on a 2-D Arakawa C-grid.
WindStress3DclassSurface wind-stress forcing on a 3-D Arakawa C-grid.
ab2_stepfunction2nd-order Adams-Bashforth.
ab3_stepfunction3rd-order Adams-Bashforth.
arakawa_jacobianfunctionArakawa (1966) discretization of J(f, g).
area_meanfunctionArea-weighted mean over physical interior T-cells.
area_sumfunctionArea-weighted sum over physical interior T-cells.
area_weightsfunctionDispatch to :func:cartesian_area_weights or :func:spherical_area_weights.
available_potential_energyfunctionAvailable potential energy at T-points.
avg_x_bwdfunctionBackward average in x (east face → centre).
avg_x_bwd_1dfunctionBackward average in x (east face → centre), 1-D.
avg_x_bwd_3dfunctionBackward average in x over all z-levels (east face → centre).
avg_x_fwdfunctionForward average in x (centre → east face).
avg_x_fwd_1dfunctionForward average in x (centre → east face), 1-D.
avg_x_fwd_3dfunctionForward average in x over all z-levels (centre → east face).
avg_xbwd_yfwdfunctionBilinear average: U-points → V-points (backward-x, forward-y).
avg_xfwd_ybwdfunctionBilinear average: V-points → U-points (forward-x, backward-y).
avg_xy_bwdfunctionBilinear average from corners to centre (backward in both x and y).
avg_xy_fwdfunctionBilinear average to NE corner (forward in both x and y).
avg_y_bwdfunctionBackward average in y (north face → centre).
avg_y_bwd_3dfunctionBackward average in y over all z-levels (north face → centre).
avg_y_fwdfunctionForward average in y (centre → north face).
avg_y_fwd_3dfunctionForward average in y over all z-levels (centre → north face).
barotropic_filterfunctionImplicit external-gravity-wave (barotropic) mode filter.
bernoulli_potentialfunctionBernoulli potential at T-points on an Arakawa C-grid.
beta_paramfunctionMeridional gradient of the Coriolis parameter from latitude.
boundary_ringfunctionWet cells adjacent to at least one dry cell (the inner ring).
build_capacitance_solverfunctionPre-compute the capacitance matrix and return a ready-to-use solver.
build_coupling_matrixfunctionBuild the tridiagonal vertical coupling (stratification) matrix A.
build_multigrid_solverfunctionBuild a multigrid solver with precomputed level hierarchies.
buoyancyfunctionCompute buoyancy from density.
cartesian_area_meanfunctionCartesian area-weighted mean.
cartesian_area_sumfunctionCartesian area-weighted sum (:func:area_sum with Cartesian grid).
cartesian_area_weightsfunctionT-cell areas on a Cartesian grid.
cartesian_volume_meanfunctionCartesian volume-weighted mean.
cartesian_volume_sumfunctionCartesian volume-weighted sum.
cartesian_volume_weightsfunctionT-cell volumes on a Cartesian 3-D grid: dx · dy · dz.
coriolis_fnfunctionBeta-plane Coriolis field.
coriolis_paramfunctionReference Coriolis parameter from latitude.
dctfunctionRe-exported from spectraldiffx.
dct1_eigenvaluesfunctionRe-exported from spectraldiffx.
dct1_eigenvalues_psfunctionRe-exported from spectraldiffx.
dct2_eigenvaluesfunctionRe-exported from spectraldiffx.
dct2_eigenvalues_psfunctionRe-exported from spectraldiffx.
dct3_eigenvaluesfunctionRe-exported from spectraldiffx.
dct3_eigenvalues_psfunctionRe-exported from spectraldiffx.
dct4_eigenvaluesfunctionRe-exported from spectraldiffx.
dct4_eigenvalues_psfunctionRe-exported from spectraldiffx.
dctnfunctionRe-exported from spectraldiffx.
decompose_vertical_modesfunctionEigendecompose the coupling matrix A to get Rossby radii and transforms.
diff_x_bwdfunctionBackward difference in x (east face → centre).
diff_x_bwd_1dfunctionBackward difference in x (east face → centre), 1-D.
diff_x_bwd_3dfunctionBackward difference in x over all z-levels (east face → centre).
diff_x_fwdfunctionForward difference in x (centre → east face).
diff_x_fwd_1dfunctionForward difference in x (centre → east face), 1-D.
diff_x_fwd_3dfunctionForward difference in x over all z-levels (centre → east face).
diff_y_bwdfunctionBackward difference in y (north face → centre).
diff_y_bwd_3dfunctionBackward difference in y over all z-levels (north face → centre).
diff_y_fwdfunctionForward difference in y (centre → north face).
diff_y_fwd_3dfunctionForward difference in y over all z-levels (centre → north face).
diffusion_2dfunctionHorizontal tracer diffusion tendency at T-points (flux form).
divergence_2dfunctionCompute ∇·(u, v) at T-points on the 2-D Arakawa C-grid.
dstfunctionRe-exported from spectraldiffx.
dst1_eigenvaluesfunctionRe-exported from spectraldiffx.
dst1_eigenvalues_psfunctionRe-exported from spectraldiffx.
dst2_eigenvaluesfunctionRe-exported from spectraldiffx.
dst2_eigenvalues_psfunctionRe-exported from spectraldiffx.
dst3_eigenvaluesfunctionRe-exported from spectraldiffx.
dst3_eigenvalues_psfunctionRe-exported from spectraldiffx.
dst4_eigenvaluesfunctionRe-exported from spectraldiffx.
dst4_eigenvalues_psfunctionRe-exported from spectraldiffx.
dstnfunctionRe-exported from spectraldiffx.
enforce_periodicfunctionFill the ghost-cell ring with periodic boundary conditions.
enstrophyfunctionEnstrophy (pointwise).
euler_stepfunctionForward Euler: y_{n+1} = y_n + dt * f(y_n).
fft_eigenvaluesfunctionRe-exported from spectraldiffx.
fft_eigenvalues_psfunctionRe-exported from spectraldiffx.
fix_boundary_cornersfunctionAverage corner ghost cells from their two face-adjacent ghost neighbours.
free_slip_boundariesfunctionFill ghost ring with symmetric reflection (free-slip wall).
heun_stepfunctionHeun (RK2) predictor-corrector.
idctfunctionRe-exported from spectraldiffx.
idctnfunctionRe-exported from spectraldiffx.
idstfunctionRe-exported from spectraldiffx.
idstnfunctionRe-exported from spectraldiffx.
imex_ssp2_stepfunctionIMEX-SSP2(2,2,2) time step.
interiorfunctionCreate an array shaped like like, zero everywhere except the interior.
kinetic_energyfunctionKinetic energy at T-points (cell centers) on an Arakawa C-grid.
layer_to_modefunctionTransform a field from layer space to mode space.
leapfrog_raf_stepfunctionLeapfrog with Robert-Asselin filter.
linear_2ptsfunction2-point centred reconstruction at face i+1/2.
linear_3pts_leftfunction3-point left-biased reconstruction at face i+1/2.
linear_3pts_rightfunction3-point right-biased reconstruction at face i+1/2.
linear_4ptsfunction4-point centred reconstruction at face i+1/2.
linear_5pts_leftfunction5-point left-biased reconstruction at face i+1/2.
linear_5pts_rightfunction5-point right-biased reconstruction at face i+1/2.
linear_6ptsfunction6-point centred reconstruction at face i+1/2.
linear_densityfunctionCompute density from temperature and salinity using a linear EOS.
linear_density_anomalyfunctionCompute density anomaly ρ’ = ρ − ρ₀ using a linear EOS.
linear_dragfunctionRayleigh (linear) bottom-drag tendency :math:-\text{coef}\cdot u.
linear_drag_tendencyfunctionLinear (Rayleigh-type) drag tendency on one velocity component.
linear_drho_dSfunctionPartial derivative ∂ρ/∂S for the linear EOS (constant).
linear_drho_dTfunctionPartial derivative ∂ρ/∂T for the linear EOS (constant).
make_multigrid_preconditionerfunctionReturn a preconditioner closure that applies a single multigrid V-cycle.
make_nystrom_preconditionerfunctionBuild a randomized Nyström preconditioner for a symmetric operator.
make_preconditionerfunctionConvenience factory that builds a preconditioner by name.
make_spectral_preconditionerfunctionReturn a spectral-solve preconditioner for PCG.
masked_laplacianfunctionApply the masked discrete Helmholtz operator (∇² − λ)·ψ.
masked_meanfunctionMean over axis, excluding dry cells.
masked_momentsfunction(mean, std) in one call — see :func:masked_mean, :func:masked_std.
masked_stdfunctionStandard deviation over axis, excluding dry cells, floored at eps.
mcfunctionMonotonized Central (MC) flux limiter.
minmodfunctionMinmod flux limiter.
mode_to_layerfunctionTransform a field from mode space to layer space.
modify_rhs_1dfunctionRe-exported from spectraldiffx.
modify_rhs_2dfunctionRe-exported from spectraldiffx.
modify_rhs_3dfunctionRe-exported from spectraldiffx.
multilayerfunctionLift a 2D horizontal operator to multilayer/multimode fields.
no_flux_boundariesfunctionFill ghost ring with zeros for normal-flux variables.
no_slip_boundariesfunctionFill ghost ring with sign-flipped interior values (no-slip wall).
okubo_weissfunctionOkubo-Weiss parameter (pointwise).
pad_interiorfunctionExtract physical interior and re-pad to original size.
plusminusfunctionSplit velocity into positive and negative parts.
potential_enstrophyfunctionPotential enstrophy (pointwise).
potential_vorticityfunctionPotential vorticity (pointwise).
potential_vorticity_multilayerfunctionMulti-layer QG potential vorticity.
pressure_from_divergencefunctionSolve ∇²p = ∇·u for the pressure correction.
pv_flux_arakawa_lambfunctionArakawa--Lamb (1981) PV flux as a grid-free free function.
pv_inversionfunctionQG potential-vorticity inversion: solve (∇² − λ)ψ = q.
qg_potential_vorticityfunctionQG potential vorticity at T-points (single layer).
quadratic_drag_tendencyfunctionQuadratic bottom-drag tendency on one velocity component.
rayleigh_relaxationfunctionSponge / relaxation tendency :math:-\text{coef}\cdot W\cdot(x - x_\text{ref}).
rayleigh_tendencyfunctionRayleigh damping tendency toward a reference state.
reconstructfunctionCompute upwind face flux along dim using the given reconstruction method.
reduced_gravityfunctionCompute reduced gravity between two layers.
relative_vorticity_cgridfunctionRelative vorticity at X-points (corners) on an Arakawa C-grid.
rk3_ssp_stepfunction3rd-order Strong-Stability-Preserving Runge-Kutta (Shu-Osher form).
rk4_stepfunctionClassic 4th-order Runge-Kutta.
rusanov_fluxfunctionLocal Lax--Friedrichs (Rusanov) numerical flux at faces along axis.
semi_lagrangian_stepfunctionAdvect a 2D scalar field using semi-Lagrangian backtracking.
shear_strainfunctionShear strain at X-points (corners) on an Arakawa C-grid.
smooth_absfunctionSmooth approximation of |x| with a nonzero gradient at the origin.
smooth_clampfunctionSmooth approximation of max(x, x_min) (a soft lower clamp).
smooth_maxfunctionSmooth approximation of the elementwise max(x, y).
solve_cgfunctionPreconditioned Conjugate Gradient solver for symmetric linear operators.
solve_helmholtz_2dfunctionRe-exported from spectraldiffx.
solve_helmholtz_3dfunctionRe-exported from spectraldiffx.
solve_helmholtz_dctfunctionRe-exported from spectraldiffx.
solve_helmholtz_dct1functionRe-exported from spectraldiffx.
solve_helmholtz_dct1_1dfunctionRe-exported from spectraldiffx.
solve_helmholtz_dct1_3dfunctionRe-exported from spectraldiffx.
solve_helmholtz_dct2_1dfunctionRe-exported from spectraldiffx.
solve_helmholtz_dct2_3dfunctionRe-exported from spectraldiffx.
solve_helmholtz_dstfunctionRe-exported from spectraldiffx.
solve_helmholtz_dst1_1dfunctionRe-exported from spectraldiffx.
solve_helmholtz_dst1_3dfunctionRe-exported from spectraldiffx.
solve_helmholtz_dst2functionRe-exported from spectraldiffx.
solve_helmholtz_dst2_1dfunctionRe-exported from spectraldiffx.
solve_helmholtz_dst2_3dfunctionRe-exported from spectraldiffx.
solve_helmholtz_fftfunctionRe-exported from spectraldiffx.
solve_helmholtz_fft_1dfunctionRe-exported from spectraldiffx.
solve_helmholtz_fft_3dfunctionRe-exported from spectraldiffx.
solve_ocean_pdefunctionIntegrate an ocean PDE using diffrax.
solve_poisson_2dfunctionRe-exported from spectraldiffx.
solve_poisson_3dfunctionRe-exported from spectraldiffx.
solve_poisson_dctfunctionRe-exported from spectraldiffx.
solve_poisson_dct1functionRe-exported from spectraldiffx.
solve_poisson_dct1_1dfunctionRe-exported from spectraldiffx.
solve_poisson_dct1_3dfunctionRe-exported from spectraldiffx.
solve_poisson_dct2_1dfunctionRe-exported from spectraldiffx.
solve_poisson_dct2_3dfunctionRe-exported from spectraldiffx.
solve_poisson_dstfunctionRe-exported from spectraldiffx.
solve_poisson_dst1_1dfunctionRe-exported from spectraldiffx.
solve_poisson_dst1_3dfunctionRe-exported from spectraldiffx.
solve_poisson_dst2functionRe-exported from spectraldiffx.
solve_poisson_dst2_1dfunctionRe-exported from spectraldiffx.
solve_poisson_dst2_3dfunctionRe-exported from spectraldiffx.
solve_poisson_fftfunctionRe-exported from spectraldiffx.
solve_poisson_fft_1dfunctionRe-exported from spectraldiffx.
solve_poisson_fft_3dfunctionRe-exported from spectraldiffx.
spherical_area_meanfunctionSpherical area-weighted mean.
spherical_area_sumfunctionSpherical area-weighted sum.
spherical_area_weightsfunctionT-cell areas on a spherical grid.
spherical_volume_meanfunctionSpherical volume-weighted mean.
spherical_volume_sumfunctionSpherical volume-weighted sum.
spherical_volume_weightsfunctionT-cell volumes on a spherical 3-D grid.
split_explicit_stepfunctionSplit-explicit barotropic/baroclinic time step.
ssh_to_streamfnfunctionConvert sea surface height to streamfunction.
strain_magnitude_squaredfunctionSquared strain magnitude (pointwise).
streamfn_to_sshfunctionConvert streamfunction to sea surface height.
streamfunction_from_vorticityfunctionInvert the vorticity–streamfunction relation ∇²ψ − λψ = ζ.
stretching_termfunctionCross-layer stretching term for multi-layer QG models.
superbeefunctionSuperbee flux limiter.
sw_potential_vorticityfunctionShallow-water potential vorticity at X-points on an Arakawa C-grid.
sw_potential_vorticity_multilayerfunctionMulti-layer shallow-water potential vorticity at X-points.
tensor_strainfunctionTensor (normal) strain at T-points on an Arakawa C-grid.
total_energyfunctionDomain-integrated total energy.
total_enstrophyfunctionDomain-integrated enstrophy.
upwind_1ptfunction1st-order upwind face value at interior faces along the last axis.
upwind_3ptfunction3-point upwind face value at i+1/2 along the last axis.
upwind_5ptfunction5-point upwind face value at i+1/2 along the last axis.
upwind_fluxfunctionCompute upwind flux with automatic stencil fallback near boundaries.
uv_center_fluxfunctionCompute raw face fluxes for a cell-centred scalar on a C-grid.
uv_node_fluxfunctionCompute raw face fluxes for a node-centred tracer on a C-grid.
van_leerfunctionVan Leer flux limiter.
vertical_velocityfunctionVertical velocity from the continuity equation.
volume_meanfunctionVolume-weighted mean over physical interior T-cells (3-D).
volume_sumfunctionVolume-weighted sum over physical interior T-cells (3-D).
volume_weightsfunctionDispatch to Cartesian/spherical volume weights based on grid type.
vorticity_flux_upwindfunctionDissipative upwind vortex-force fluxes on a C-grid.
wall_boundariesfunctionApply wall boundary conditions appropriate for a C-grid staggering.
weno_3ptsfunction3-points non-linear left-biased stencil reconstruction:
weno_3pts_improvedfunction3-points non-linear left-biased stencil reconstruction:
weno_3pts_improved_rightfunction3-points non-linear right-biased WENO-Z stencil reconstruction at face q0+1/2:
weno_3pts_rightfunction3-points non-linear right-biased stencil reconstruction at face q0+1/2:
weno_5ptsfunction5-points non-linear left-biased stencil reconstruction
weno_5pts_improvedfunction5-points non-linear left-biased stencil reconstruction
weno_5pts_improved_rightfunction5-points non-linear right-biased WENO-Z stencil reconstruction at face q0+1/2:
weno_5pts_rightfunction5-points non-linear right-biased stencil reconstruction at face q0+1/2:
weno_7ptsfunction7-points non-linear left-biased stencil reconstruction
weno_7pts_rightfunction7-points non-linear right-biased stencil reconstruction at face q0+1/2:
weno_9ptsfunction9-points non-linear left-biased stencil reconstruction
weno_9pts_rightfunction9-points non-linear right-biased stencil reconstruction at face q0+1/2:
wind_stress_tendencyfunctionMomentum tendency from a surface wind stress.
zero_boundariesfunctionFill ghost ring with zeros (homogeneous Dirichlet).
zero_gradient_boundariesfunctionFill ghost ring by copying nearest interior value (zero gradient / Neumann).

Upstream: spectraldiffx

Pseudospectral differentiation, filters and PDE solvers.

spectraldiffx

NameKindWhat it does
ChebyshevDerivative1Dclass1D Chebyshev derivative operator using the precomputed differentiation matrix.
ChebyshevDerivative2Dclass2D Chebyshev derivative operators on [−Lx, Lx] × [−Ly, Ly].
ChebyshevDerivative3Dclass3D Chebyshev derivative operators on [−Lz, Lz] × [−Ly, Ly] × [−Lx, Lx].
ChebyshevFilter1Dclass1D Chebyshev spectral filter for smoothing and numerical stabilisation.
ChebyshevFilter2Dclass2D Chebyshev spectral filter on [−Lx, Lx] × [−Ly, Ly].
ChebyshevGrid1Dclass1D Chebyshev grid on the domain [-L, L].
ChebyshevGrid2Dclass2D Chebyshev grid on [-Lx, Lx] × [-Ly, Ly].
ChebyshevGrid3Dclass3D Chebyshev grid on [-Lz, Lz] × [-Ly, Ly] × [-Lx, Lx].
ChebyshevHelmholtzSolver1Dclass1D Chebyshev-collocation Helmholtz/Poisson solver with Dirichlet or Neumann BCs.
ChebyshevHelmholtzSolver2Dclass2D Chebyshev-collocation Helmholtz/Poisson solver with Dirichlet BCs.
ChebyshevPoissonSolver1Dclass1D Chebyshev Poisson solver: d²u/dx² = f on [−L, L].
ChebyshevPoissonSolver2Dclass2D Chebyshev Poisson solver: ∇²u = f with Dirichlet BCs.
ChebyshevTransform1DclassForward/inverse 1D Chebyshev transform.
ChebyshevTransform2DclassForward/inverse 2D Chebyshev transform (tensor product of 1D).
FourierGrid1DclassFourier grid setup for periodic domain.
FourierGrid2Dclass2D Fourier grid for doubly periodic domain.
FourierGrid3Dclass3D Fourier grid for triply periodic domain.
SpectralDerivative1Dclass1D Spectral derivative operator using the Fast Fourier Transform (FFT).
SpectralDerivative2Dclass2D Spectral derivative operators for doubly periodic rectangular domains.
SpectralDerivative3Dclass3D Spectral derivative operators for triply periodic domains.
SpectralFilter1Dclass1D Spectral filter for smoothing and numerical stabilization.
SpectralFilter2Dclass2D Spectral filter for doubly periodic domains.
SpectralFilter3Dclass3D Spectral filter for triply periodic domains.
SphericalDerivative1Dclass1D spectral derivative operator on Gauss-Legendre latitude grid.
SphericalDerivative2Dclass2D pseudo-spectral derivative operators on the sphere.
SphericalDivergenceInversionSolverclassDivergence-inversion solver on the sphere.
SphericalFilter1Dclass1D spectral filter on the Gauss–Legendre latitude grid.
SphericalFilter2Dclass2D spectral filter on the full sphere lat-lon grid.
SphericalGrid1DclassGauss-Legendre grid for the latitude (colatitude) direction.
SphericalGrid2DclassFull sphere latitude-longitude pseudo-spectral grid.
SphericalHarmonicTransformclassFull 2D Spherical Harmonic Transform (SHT).
SphericalHelmholtzDecompositionclassHelmholtz decomposition of a horizontal vector field on the sphere.
SphericalHelmholtzSolverclassSpectral Helmholtz solver on the sphere: (∇² − α) φ = f.
SphericalPoissonSolverclassSpectral Poisson solver on the sphere: ∇²φ = f.
SphericalVorticityInversionSolverclassVorticity-inversion solver on the sphere.
build_capacitance_solverfunctionPre-compute the capacitance factorisation and return a solver.
cheb_dealias_productfunctionCompute the dealiased pointwise product a·b on a Chebyshev grid.
chebyshev_antiderivative_coeffsfunctionIndefinite integral of a Chebyshev series, vanishing at x = −L.
chebyshev_derivative_coeffsfunctionDifferentiate a Chebyshev series in coefficient space (last axis).
chebyshev_integral_coeffsfunctionDefinite integral ∫_{−L}^{L} u(x) dx from Chebyshev coefficients.
clenshaw_curtis_integrate_1dfunctionIntegrate a 1D nodal field over [−L, L] using Clenshaw–Curtis.
clenshaw_curtis_integrate_2dfunctionIntegrate a 2D nodal field over [−Lx, Lx] × [−Ly, Ly].
clenshaw_curtis_weightsfunctionClenshaw–Curtis quadrature weights on Gauss–Lobatto nodes of [−L, L].

Upstream: functax

Function approximation: bases, quadrature rules, interpolation.

functax

NameKindWhat it does
FunctaxErrorclassBase class for every exception raised by functax.
GeometryErrorclassRaised when an axis, grid or point set is malformed.
MissingExtraErrorclassRaised when a module needs the functax[jax] extra and it is missing.
NonlinearSchemeErrorclassRaised when a linear-only operation meets a plan whose fit is nonlinear in y.
OutsideDomainErrorclassRaised under outside="raise" when a target lies outside the domain.
PolicyErrorclassRaised when an interpolation policy names an option that does not exist.
ValidationErrorclassRaised when an argument fails validation.

functax.diffops

NameKindWhat it does
curl2dfunctionThe scalar curl (vorticity) ∂_x u_y − ∂_y u_x of a planar field.
divergencefunctionThe divergence ∇ · u = ∑_d ∂u_d/∂x_d of a vector field.
gradientfunctionThe gradient ∇f of a scalar field.
jacobian_fieldfunctionThe Jacobian J_kd = ∂u_k/∂x_d of a vector field.
laplace_beltramifunctionThe Laplace–Beltrami operator Δ_S f of a field on the unit sphere.
laplacianfunctionThe Laplacian Δf = ∑_d ∂²f/∂x_d² of a scalar field.
surface_gradfunctionThe surface gradient ∇_S f of a field on the unit sphere.
surface_grad_enufunctionThe east and north components of the surface gradient, at a (λ, φ).

functax.geometry

NameKindWhat it does
AffineGridclassA regular 2-D grid given by an affine transform and a shape.
AxisclassOne strictly monotone coordinate axis, optionally periodic or in time.
CurvilinearGridclassA 2-D grid whose node coordinates are given per node, such as a swath.
MetricconstantMetric
PointsclassScattered sites, with the metric their distances use.
RectilinearGridclassA tensor-product grid with one Axis per dimension.
cartesian_to_tangentfunction3-D vectors to their east and north components (v · ê, v · n̂).
chebyshev_nodesfunctionThe Chebyshev nodes of degree N on [a, b], from b down to a.
chord_distancefunctionThe straight-line distance through the sphere between every pair.
ecef_to_lonlatfunctionEarth-centred, Earth-fixed coordinates to geodetic (λ, φ) and height.
enu_basisfunctionThe local east, north and up unit vectors at each point.
fibonacci_spherefunctionThe Fibonacci lattice: n near-uniform points on the unit sphere.
from_pixelfunctionMap fractional pixel (row, col) to coordinates (x, y): the inverse of to_pixel.
gauss_legendre_gridfunctionThe Gauss–Legendre grid on the sphere, with its quadrature weights.
geodesic_distancefunctionThe great-circle distance between every pair.
healpix_gridfunctionHEALPix pixel centres, each weighted by the equal pixel area.
icospherefunctionThe subdivided icosahedron, a quasi-uniform triangle mesh of the sphere.
latlon_gridfunctionThe regular cell-centred lon/lat grid, weighted by exact cell areas.
local_tangent_planefunctionProject points onto the tangent plane at origin, as (east, north).
lonlat_to_eceffunctionGeodetic (λ, φ) and height to Earth-centred, Earth-fixed coordinates.
lonlat_to_unitfunctionLift longitude and latitude onto the unit sphere.
mesh_vertex_areasfunctionThe lumped (barycentric) vertex areas of a triangle mesh.
pairwise_distancefunctionThe distance from every source to every target, in their shared metric.
pixel_centresfunctionThe x and y of every pixel centre of a grid, each of shape (rows, cols).
rotation_to_polefunctionThe rotation R with R û(centre) = (0, 0, 1).
spherical_polygon_areafunctionThe signed area of a spherical polygon with great-circle edges.
tangent_to_cartesianfunctionEast and north components (u, v) to the 3-D tangent vector u ê + v n̂.
to_pixelfunctionMap coordinates (x, y) to fractional pixel (row, col), centres at integers.
unit_to_lonlatfunctionLongitude and latitude of vectors on (or off) the unit sphere.
windowfunctionThe row and column slices of the pixels that cover bounds.

functax.interp

NameKindWhat it does
AkimaclassAkima’s local cubic, as SciPy’s Akima1DInterpolator(method="akima").
BSplineclassA B-spline of order k on every axis: (k + 1)ᴰ taps, after the prefilter.
BSplineBasisclassThe centred B-spline of order k (degree k): k + 1 taps per axis.
BandedPrefilterclassc = B⁻¹ y per axis: the B-spline prefilter, separable on a grid.
BasisclassA local basis on one axis: S relative taps, and weights from the offsets.
BinningclassAggregate scattered samples into grid cells: Hᵀ y, normalised for the mean.
BinningPlanclassA plan from N samples to M cells: the sums, means or counts per cell.
BrownianBridgeclassThe Brownian bridge between the knots of one axis, cell by cell.
ChebyshevclassThe Chebyshev series of samples on Chebyshev nodes, read at arbitrary points.
ChebyshevFitclassc = P C y: the first K Chebyshev coefficients of samples on Chebyshev nodes.
ChebyshevInterpolantclassA fitted Chebyshev series f̂(x) = ∑ₖ cₖ Tₖ(ξ(x)), read at targets by clenshaw.
ComposedPlanclassouter @ inner: H_outer H_inner 𝒮_inner, one plan with the product stencil.
ConservativeclassFirst-order conservative remapping: each target cell’s area-weighted mean.
CubicclassKeys cubic convolution on every axis: 4ᴰ taps per target, no prefilter.
CubicBasisclassKeys cubic convolution: taps i − 1 … i + 2, weights W(1 + t) … W(2 − t).
CubicSplineclassThe interpolating C² cubic spline, as scipy.interpolate.CubicSpline.
DelaunayclassLinear interpolation on a triangulation of the sources: D + 1 taps per target.
DerivativePlanclassA plan whose read-out holds basis derivatives: ∂ᵐf̂/∂x_cᵐ at the targets.
Fitclassc = 𝒮(y), applied once per field before the read-out.
FourierclassBand-limited Fourier resampling from N to M nodes of one periodic axis.
FourierReadoutclassH y = (M/N) Re F⁻¹_M[S F_N y], band-limited resampling by two FFTs.
GaussianPlanclassA plan read as a Gaussian posterior: f(X*) ∣ y ~ 𝒩(H 𝒮(y), Σ*).
HermiteFitclass[y; m] from y: the values in increasing-knot order and their slopes.
IdentityclassThe fit of every local scheme: c = y.
InterpolantclassA fitted field f̂(x) = ∑ₛ wₛ(t(x)) c_{iₛ(x)}, read at any targets.
InverseDistanceclassInverse-distance weighting of the Q nearest scattered sources.
Kernelclassk(x, x′): the (M, N) cross-kernel of M targets and N sources.
KernelCovarianceclassΣ*(x, x′) = k(x, x′) − h(x)ᵀ A⁻¹ h(x′), the posterior covariance of a kernel fit.
KernelReadoutclassThe dense read-out of a kernel scheme: f̂(X*) = K* c + P* b.
KernelSolveclass[c; b] = A⁻¹ [y; 0], the saddle-point system of a kernel and a tail.
KrigingclassKriging: the best linear unbiased predictor under a covariance k and a drift.
LinearclassLinear on every axis: 2ᴰ taps per target, weights ∏_d (1 − t_d or t_d).
LinearBasisclassLinear: taps i and i + 1, with weights 1 − t and t.
LocalGeometryclassWhat a local plan was built from: the source, the target coordinates, the bases.
LocalSchemeclassA scheme with one local basis per axis and the identity fit.
NearestclassNearest neighbour on every axis: one tap per target, weight 1.
NearestBasisclassNearest neighbour: one tap, the closer of i and i + 1, with weight 1.
NonlinearPlanclassA plan whose fit depends on y: no fixed operator or adjoint, but linearize.
PchipclassMonotone piecewise cubic Hermite (Fritsch-Carlson), as SciPy’s PCHIP.
Planclassf̂(X*) = H 𝒮(y), fitted once, applied to many fields.
PoliciesclassOutside the domain, at missing samples, and at the edges.
PolyharmonicclassThe polyharmonic spline φ(r) = ±rᵏ for odd k, ±rᵏ log r for even k.
PosteriorCovarianceclassΣ*, the (M, M) posterior covariance of the field at M targets.
RBFclassRadial basis function interpolation: f̂(x) = ∑ⱼ cⱼ k(x, xⱼ) + ∑ₚ bₚ pₚ(x).
RadialKernelclassk(x, x′) = φ(‖x − x′‖), Euclidean in the coordinates as given.
Readoutclassc → f̂(X*): the read-out of a plan, from coefficients to target values.
SchemeclassAn interpolation scheme: configuration, frozen into a Plan by plan.
SeriesInterpolantclassA 1-D series field f̂ read at targets chosen inside the trace.
SeriesSchemeclassA scheme on one axis with a cubic Hermite read-out and its own slopes.
SteffenclassSteffen’s monotone cubic: no overshoot between knots, by construction.
StencilclassA sparse read-out H: row k reads S source values at flat indices.
TensorclassOne local scheme per source axis, as one tensor stencil.
TransposedStencilclassf̂ = diag(s) Hᵀ y: a sampling stencil H used backwards, scaled per cell.
WendlandclassThe compact Wendland kernel φ(r) = ψ(r/ρ), zero for r ≥ ρ.
WindowedPlanclassplan[window]: the rows of a grid target inside a window, sources unchanged.
bsplinefunctionThe centred B-spline βᵏ of degree k at x.
check_outsidefunctionEnforce outside="raise" on the host; no-op for every other policy.
clenshawfunctionThe Chebyshev series f(x) = ∑ₖ aₖ Tₖ(ξ(x)) by Clenshaw’s recurrence.
composefunctionH = H_outer H_inner: apply inner first, then outer, as one stencil.
index_positionsfunctionThe fractional index position u of each target, so node j sits at u = j.
locatefunctionThe cell index i, the offset t ∈ [0, 1) and the inside flag of each target.
locate_curvilinearfunctionThe cell (r, c), the offset (s, t) and the inside flag of targets on a swath.
overlap_weights_1dfunctionThe (M, N) overlap lengths |cⱼ ∩ Cᵢ| of every target and source cell.
plan_keyfunctionsha256 hex of the scheme, the policies and both geometries’ bytes.
remap_tapsfunctionBring tap indices back onto [0, N − 1] by a boundary rule.
spline_polesfunctionThe poles zₚ of the order-k B-spline prefilter, as in scipy.ndimage.
tensor_stencilfunctionH = H₁ ⊗ … ⊗ H_D: one local basis per source axis, read at the targets.

functax.project

NameKindWhat it does
Variationalclassx = argmin (Hx − y)ᵀR⁻¹(Hx − y) + λ‖Lx‖², the variational smoothing fit.
fill_gapsfunctionThe image with its holes filled: Δx = 0 (Laplace) or Δ²x = 0 (biharmonic).
galerkinfunctionc = (ΦᵀWΦ)⁻¹ ΦᵀW y, the Galerkin projection with quadrature weights W.
least_squaresfunctionc = argmin ‖Φc − y‖² + α‖c‖², the ridge least-squares coefficients.

functax.quad

NameKindWhat it does
CurveRuleclassA rule on a curve L: ∫_L c dℓ ≈ ∑ₖ Δsₖ c(xₖ), with the unit normal nₖ.
RuleclassA quadrature rule as data: nodes xₙ and weights wₙ, ∫ g dx ≈ ∑ₙ wₙ g(xₙ).
SphereRuleclassA rule on a sphere of radius a: ∫_{S²} g dA ≈ ∑_q w_q g(u_q).
cell_areafunctionThe cell-area rule of a grid: ∫ g dA ≈ ∑ₖ |Cₖ| g(xₖ) over its cells Cₖ.
clenshaw_curtisfunctionThe n-point Clenshaw–Curtis rule on [a, b], at the Chebyshev extreme points.
gauss_legendrefunctionThe n-point Gauss–Legendre rule on an interval [a, b].
polylinefunctionA rule along a polyline: n nodes per segment, arc-length weights and normals.
simpsonfunctionThe composite Simpson rule on given nodes, as scipy.integrate.simpson.
sphere_fibonaccifunctionThe Fibonacci rule: n near-uniform points of equal weight 4πa²/n.
sphere_gauss_legendrefunctionThe Gauss–Legendre × uniform-longitude rule on the sphere, exact to a degree.
sphere_healpixfunctionThe HEALPix rule: 12 N_side² pixel centres of equal weight 4πa²/Q.
sphere_latlonfunctionThe cell-centred lon/lat rule: equiangular cells weighted by their exact areas.
trapezoidfunctionThe composite trapezoid rule on given nodes, uniform or not.

functax.transform

NameKindWhat it does
ChebyshevTransform1DclassThe forward and inverse Chebyshev transform on N Chebyshev nodes.
ChebyshevTransform2DclassThe tensor-product Chebyshev transform on an (N_y, N_x) grid of nodes.
SphericalHarmonicTransformclassDense, differentiable spherical-harmonic analysis and synthesis on a grid.
nonuniform_irfftfunctionA truncated real Fourier series evaluated at points of [0, 1)^d.
nonuniform_rfftfunctionThe truncated Fourier coefficients of a field sampled at points of [0, 1)^d.

Upstream: argminax

Optimisation with uncertainty at the minimum: solvers, curvature.

argminax

NameKindWhat it does
ArgminaxErrorclassBase class for every exception raised by argminax.
MissingExtraErrorclassRaised when a function needs an optional extra that is not installed.
ValidationErrorclassRaised when an argument fails validation.

argminax.adjoint

NameKindWhat it does
KStepclassDifferentiate a minimiser through its last k iterate updates only.
OneStepclassDifferentiate a minimiser through its last iterate update only.
to_optimistix_adjointfunctionReturn the optimistix adjoint that implements an adjoint spec.

argminax.curvature

NameKindWhat it does
LaplaceclassThe Gaussian N(x̂, Ŝ) at a minimum, with Ŝ = Ĥ⁻¹ never formed.
VarianceEstimateclassA probed estimate of the marginal variances, with its standard error.
gauss_newtonfunctionBuild the Laplace posterior at a minimum from whitened residuals.
low_rankfunctionReturn a low-rank form of the covariance of a whitened posterior.
marginal_variancefunctionReturn the marginal variances diag(Ŝ) of a Laplace posterior.
push_forwardfunctionMap a posterior in whitened coordinates back to physical ones.
sample_by_perturbationfunctionDraw from a Gauss–Newton posterior by perturbing its residuals.

argminax.diagnose

NameKindWhat it does
TraceEstimateclassA scalar diagnostic and its standard error.
averaging_kernelfunctionReturn the averaging kernel A = ∂x̂/∂x of a Laplace posterior, lazily.
degrees_of_freedomfunctionReturn the degrees of freedom for signal, the trace of the averaging kernel.
evidencefunctionReturn the Laplace evidence log p(y) at a minimum.
information_contentfunctionReturn the information content of the measurement, in nats.
optimize_prior_precisionfunctionReturn the isotropic prior precision λ that maximises the Laplace evidence.

argminax.solve

NameKindWhat it does
CovarianceLaplaceResultclassThe Gaussian at the mode of a GP with prior covariance K.
DualSolutionclassThe result of an observation-space solve.
GaussNewtonCGclassGauss–Newton or Levenberg–Marquardt, each step by a matrix-free inner CG.
LaplaceModeResultclassThe Gaussian N(x̂, Λ_x|y⁻¹) at the mode, with gaussx’s LaplaceResult fields.
ReparametrisedclassA bound on the state, imposed by solving in an unconstrained variable u.
SiteLaplaceResultclassThe mode of a latent GP and the Newton site naturals there.
dual_solvefunctionSolve the 3D-Var increment in observation space.
incremental_dual_solvefunctionIncremental 3D-Var in observation space, for a nonlinear forward model.
laplace_modefunctionMode and Gaussian approximation of a latent Gaussian model, in precision form.
laplace_mode_covariancefunctionLaplace approximation of a GP with prior covariance K, by damped Newton.
laplace_mode_sitesfunctionLaplace approximation by damping the site naturals, given a posterior-mean map.

Upstream: integrix

Integration: rules, cumulative scans, time marching, expectations.

integrix

NameKindWhat it does
IntegrixErrorclassBase class for every exception raised by integrix.
ValidationErrorclassRaised when an argument fails validation.

integrix.adapt

NameKindWhat it does
GaussKronrodclassAdaptive Gauss–Kronrod quadrature to a tolerance, with an error estimate.
RombergclassRomberg integration of a smooth integrand on a finite interval.
TanhSinhclassTanh–sinh (double-exponential) quadrature, for singular ends and infinite limits.
cumulative_adaptivefunction∫ from x₀ to each node xₖ of f, each interval integrated adaptively.

integrix.adjoint

NameKindWhat it does
CheckpointedclassThe checkpointed adjoint: store every k-th state, recompute between them.
TruncatedclassThe truncated adjoint: gradients flow through the carry of the last k steps.
checkpointed_scanfunctionjax.lax.scan that stores the carry only every k steps for reverse mode.
to_diffrax_adjointfunctionMap an adjoint spec onto a diffrax.AbstractAdjoint.
truncated_scanfunctionjax.lax.scan with gradients truncated to the trailing k steps.

integrix.expect

NameKindWhat it does
ExpectationclassAn estimate of 𝔼[f] with its standard error.
effective_sample_sizefunctionESS = (∑ₛ wₛ)² / ∑ₛ wₛ² from log weights, along the last axis.
importancefunctionSelf-normalised importance sampling: Î = ∑ₛ wₛ f(xₛ) / ∑ₛ wₛ, xₛ ~ q.
log_gauss_hermitefunctionlog 𝔼[f(Q)] for a lognormal Q, by Gauss–Hermite quadrature in log Q.
log_simpsonfunctionlog ∫ₐᵇ f(q) dq by composite Simpson on a uniform grid in u = log q.
monte_carlofunctionPlain Monte Carlo: Î = (1/S) ∑ₛ f(xₛ), with standard error σ̂/√S.
pareto_smoothed_log_weightsfunctionPareto-smoothed log importance weights and the tail shape k̂.
qmcfunctionRandomised quasi-Monte Carlo over [0, 1)^D, with an error from random shifts.

integrix.march

NameKindWhat it does
AB2SolverclassSecond-order Adams–Bashforth, run by integrix.march.run.
AB3SolverclassThird-order Adams–Bashforth as a diffrax solver, with an SSP-RK3 start.
AbstractStepperclassA fixed-step scheme whose history lives in the loop carry.
ForwardEulerDfxclassForward Euler as a diffrax solver: yₙ₊₁ = yₙ + h F(tₙ, yₙ).
IMEX_SSP2classIMEX-SSP2(2,2,2) for a diffrax.MultiTerm of an explicit and an implicit term.
LeapfrogRAFSolverclassLeapfrog with a Robert–Asselin filter, run by integrix.march.run.
RK2HeunclassHeun’s method (RK2), with an embedded forward-Euler error estimate.
RK3SSPclassThird-order strong-stability-preserving Runge–Kutta (Shu–Osher).
RK4ClassicclassThe classical fourth-order Runge–Kutta method, fixed steps only.
SSP_RK104classKetcheson’s ten-stage, fourth-order SSP Runge–Kutta, fixed steps only.
SSP_RK2classSecond-order SSP Runge–Kutta, the same scheme as RK2Heun.
SplitExplicitRKSolverclassSplit-explicit stepping as an AbstractStepper, for integrix.march.run.
SplitExplicitTermsclassThe vector fields of a split-explicit model, passed to run as rhs.
ab2_stepfunctionOne second-order Adams–Bashforth step.
ab3_stepfunctionOne third-order Adams–Bashforth step.
euler_stepfunctionOne forward-Euler step: yₙ₊₁ = yₙ + h f(yₙ).
heun_stepfunctionOne Heun (RK2) step, order 2, SSP with C = 1.
imex_solverfunctionA KenCarp3 IMEX solver whose implicit stage is matrix-free.
imex_ssp2_stepfunctionOne IMEX-SSP2(2,2,2) step, with the caller’s implicit solve.
imex_stepsize_controllerfunctionAn adaptive PID step-size controller for an IMEX solve.
leapfrog_raf_stepfunctionOne leapfrog step with a Robert–Asselin filter on the middle level.
rk3_ssp_stepfunctionOne third-order SSP Runge–Kutta step in Shu–Osher form, C = 1.
rk4_stepfunctionOne classical fourth-order Runge–Kutta step.
runfunctionMarch y₀ through n_steps constant steps of h from t₀.
split_explicit_stepfunctionOne split-explicit barotropic/baroclinic step.
stable_stepfunctionThe largest stable forward-Euler step for advection and diffusion together.

integrix.rule

NameKindWhat it does
IntegralclassThe result of an integral: its value, an error estimate and diagnostics.
integratefunctionIntegrate values, or an integrand, against a rule’s weights.
log_integratefunctionlog I from log f: the log-sum-exp twin of integrate.
weighted_meanfunctionThe mean of the values under a weight function, with one rule for both sums.

integrix.scan

NameKindWhat it does
cumulativefunctionThe running trapezoid integral of samples along one axis.