pyphi.distribution.repertoire_shape#
- pyphi.distribution.repertoire_shape(all_node_indices, purview, alphabet_sizes=None)[source]#
Return the shape of a repertoire.
- Parameters:
all_node_indices (tuple[int]) – The node indices of the substrate.
purview (tuple[int]) – The indices of nodes in the repertoire.
alphabet_sizes (tuple[int, ...] or None, optional) – Per-node alphabet sizes indexed by node index. When
None(the default), all purview nodes are treated as binary (alphabet size 2).
- Returns:
list[int] – The shape of the repertoire. Purview nodes take their alphabet size (or 2 when binary) and non-purview nodes are collapsed to a unitary dimension.
- Return type:
Examples
>>> purview = (0, 2) >>> repertoire_shape(range(3), purview) [2, 1, 2]