pyphi.convert.le_index2state#
- pyphi.convert.le_index2state(i, number_of_nodes)[source]#
Convert a decimal integer to a PyPhi state-tuple using the little-endian convention.
The output is the reverse of
be_index2state().- Parameters:
- Returns:
tuple[int] – A state-tuple where the i-th element gives the state of the i-th node.
Examples
>>> number_of_nodes = 5 >>> le_index2state(1, number_of_nodes) (1, 0, 0, 0, 0) >>> number_of_nodes = 8 >>> le_index2state(7, number_of_nodes) (1, 1, 1, 0, 0, 0, 0, 0)