validate
¶
Methods for validating arguments.
- pyphi.validate.direction(direction, allow_bi=False)¶
Validate that the given direction is one of the allowed constants.
If
allow_bi
isTrue
thenDirection.BIDIRECTIONAL
is acceptable.
- pyphi.validate.tpm(tpm, check_independence=True)¶
Validate a TPM.
The TPM can be in
2-dimensional state-by-state form,
2-dimensional state-by-node form, or
multidimensional state-by-node form.
- pyphi.validate.conditionally_independent(tpm)¶
Validate that the TPM is conditionally independent.
- pyphi.validate.connectivity_matrix(cm)¶
Validate the given connectivity matrix.
- pyphi.validate.node_labels(node_labels, node_indices)¶
Validate that there is a label for each node.
- pyphi.validate.node_states(state)¶
Check that the state contains only zeros and ones.
- pyphi.validate.state_length(state, size)¶
Check that the state is the given size.
- pyphi.validate.state_reachable(subsystem)¶
Return whether a state can be reached according to the network’s TPM.
- pyphi.validate.cut(cut, node_indices)¶
Check that the cut is for only the given nodes.
- pyphi.validate.time_scale(time_scale)¶
Validate a macro temporal time scale.
- pyphi.validate.partition(partition)¶
Validate a partition - used by blackboxes and coarse grains.
- pyphi.validate.coarse_grain(coarse_grain)¶
Validate a macro coarse-graining.
- pyphi.validate.blackbox(blackbox)¶
Validate a macro blackboxing.
- pyphi.validate.blackbox_and_coarse_grain(blackbox, coarse_grain)¶
Validate that a coarse-graining properly combines the outputs of a blackboxing.