pyphi.partition.SystemPartitionRegistry#
- class pyphi.partition.SystemPartitionRegistry[source]#
Bases:
RegistryStorage for system-level partition schemes registered with PyPhi.
Schemes registered here yield system-level partitions (
pyphi.protocols.SystemPartitionLikeinstances) for a set of nodes. Used by SIA computations to enumerate cuts of the full system.Users can define custom partitions and use them by setting
pyphi.config.system_partition_scheme = 'NONE'.Registered objects are validated at registration: they must be callable and their signature must accept a
(nodes,)call, so wrong-shape registrations (e.g. a mechanism-level scheme, which requires a second positional argument) fail at import rather than at the bottom of a SIA computation.Examples
>>> @system_partition_types.register('NONE') ... def no_partitions(nodes): ... return []