per_obs_filter

nyx.core.filters.per_obs_filter(tree)[source]

Boolean mask for every per-observation leaf in tree.

True for the factor of a Parameter with per_obs=True, and for everything below a PerObs.

Parameters:

tree (pytree)

Returns:

A filter spec: the same shape as tree, with a bool at every leaf and a single True standing in for a whole PerObs subtree.

Return type:

pytree