pyphi.distribution.unflatten#

pyphi.distribution.unflatten(repertoire, purview, N, big_endian=False)[source]#

Unflatten a repertoire.

By default, the input is assumed to be in little-endian order.

Parameters:
  • repertoire (np.ndarray) – A probability distribution.

  • purview (Iterable[int]) – The indices of the nodes whose states the probability is distributed over.

  • N (int) – The size of the substrate.

  • big_endian (bool, optional) – If True, assume the flat repertoire is in big-endian order.

Returns:

np.ndarray – The unflattened repertoire, shaped with one dimension per substrate node.

Return type:

Repertoire