pyphi.validate#

Methods for validating user input.

Functions

connectivity(cm, factored_tpm)

Validate that a connectivity matrix is not under-specified.

connectivity_matrix(cm)

Validate the given connectivity matrix.

direction(direction[, allow_bi])

Validate that the given direction is one of the allowed constants.

directions(directions, **kwargs)

Validate each direction in an iterable.

is_substrate(substrate)

Validate that the argument is a Substrate.

node_labels(node_labels, node_indices)

Validate that there is a label for each node.

node_states(state, alphabet_sizes)

Check that each state entry is a valid index into its node's alphabet.

non_overlapping(complexes)

Validate that complexes have pairwise-disjoint units (exclusion).

relata(relata)

Validate a set of relata.

state_length(state, size)

Check that the state is the given size.

state_reachable(system)

Raise StateUnreachableForwardsError if the state is unreachable.

substrate(n)

Validate a Substrate.

system(s)

Validate a System.

system_partition(partition, node_indices)

Check that the partition covers only the given nodes.

transition_states(substrate, before_state, ...)

Raise if the observed state pair is impossible under the dynamics.