rxmc.covariance.StackContext#

class rxmc.covariance.StackContext(x: ndarray, y: ndarray, ym: ndarray | None, supports: tuple)[source]#

Bases: object

Bundle of stacked arrays passed to every Term.add_to().

Parameters:
  • x (np.ndarray) – Stacked independent variable, np.concatenate over observations.

  • y (np.ndarray) – Stacked observed data (in each observation’s comparison space).

  • ym (np.ndarray or None) – Stacked model prediction (same space as y). None when a constant covariance is assembled before any model evaluation (see constant()); constant terms never read it.

  • supports (tuple of np.ndarray) – One contiguous index array per observation block, in stacking order.

__init__(x: ndarray, y: ndarray, ym: ndarray | None, supports: tuple) → None#

Methods

__init__(x, y, ym, supports)

constant(x, y, supports)

A stack with no model prediction, for assembling constant terms.

Attributes

x: ndarray#
y: ndarray#
ym: ndarray | None#
supports: tuple#
classmethod constant(x, y, supports) → StackContext[source]#

A stack with no model prediction, for assembling constant terms.