pyphi.convert.le2be_state_by_state#
- pyphi.convert.le2be_state_by_state(tpm)#
Convert a state-by-state TPM from big-endian to little-endian or vice versa.
- Parameters:
tpm (np.ndarray) – A state-by-state TPM.
- Returns:
np.ndarray – The state-by-state TPM in the other indexing format.
Examples
>>> tpm = np.arange(16).reshape([4, 4]) >>> be2le_state_by_state(tpm) array([[ 0, 2, 1, 3], [ 8, 10, 9, 11], [ 4, 6, 5, 7], [12, 14, 13, 15]])