validate

Methods for validating common types of input.

exception pyphi.validate.StateUnreachableError(current_state, past_state, tpm, message)

Raised when the current state of a network cannot be reached, either from any state or from a given past state.

pyphi.validate.direction(direction)
pyphi.validate.tpm(tpm)

Validate a TPM.

pyphi.validate.conditionally_independent(tpm)
pyphi.validate.connectivity_matrix(cm)
pyphi.validate.state_reachable(past_state, current_state, tpm)

Return whether a state can be reached according to the given TPM.

pyphi.validate.state_reachable_from(past_state, current_state, tpm)

Return whether a state is reachable from the given past state.

pyphi.validate.current_state_length(state, size)
pyphi.validate.past_state_length(state, size)
pyphi.validate.state(network)

Validate a network’s current and past state.

pyphi.validate.perturb_vector(pv, size)

Validate a network’s pertubation vector.

pyphi.validate.network(network)

Validate TPM, connectivity matrix, and current and past state.