pyphi.partition.PartitionRegistry#
- class pyphi.partition.PartitionRegistry[source]#
Bases:
RegistryStorage for mechanism-level partition schemes registered with PyPhi.
Schemes registered here yield mechanism-level partitions (
pyphi.protocols.MechanismPartitioninstances) for each (mechanism, purview) pair. Used bySystem.find_mipto enumerate partitions during MIP search.Users can define custom partitions and use them by setting
pyphi.config["iit.mechanism_partition_scheme"] = 'NONE'.Registered objects are validated at registration: they must be callable and their signature must accept a
(mechanism, purview)call, so wrong-shape registrations fail at import rather than at the bottom of a phi computation.Examples
>>> @partition_types.register('NONE') ... def no_partitions(mechanism, purview): ... return []