Grid#

class hybrid_aif.Grid[source]#

Bases: object

A rectangular grid over some coordinates of a continuous state factor’s state.

The cells are flattened in C order over shape, so a table’s parent axis for the state factor has n_cells entries. The first and last cell on each axis absorb the tail beyond the extent.

shape: tuple[int, ...]#

The number of cells along each spanned axis.

low: tuple[float, ...]#

The lower end of the extent along each axis (one number each, or one number for every axis).

high: tuple[float, ...]#

The upper end of the extent along each axis (one number each, or one number for every axis).

axes: tuple[int, ...] | None = None#

The state coordinates spanned, in order (None: 0, 1, ...).

property n_cells: int#

The number of cells: the product of shape.

__init__(shape, low, high, axes=None)#