asterion.messengers#
Messengers module.
Module Contents#
- class dimension(name, size, coords=None, dim=None)[source]#
Bases:
numpyro.primitives.MessengerContext manager for a model dimension.
- Parameters
name (str) – Name of the dimension.
size (int) – Size of the dimension.
coords (array_like, optional) – Coordinates for points in the dimension. Defaults to
np.arange(size).dim (int, optional) – Where to place the dimension. Defaults to
-1which corresponds to the rightmost dimension. Must be negative.
- coords :numpy.ndarray#
Coordinates for the dimension.
- Type
- process_message(self, msg)[source]#
Process the message.
- Parameters
msg (dict) – Message.
- Raises
ValueError – If the corresponding dimension of the site is of incorrect size.