pyphi.conf.presets.canonical#

pyphi.conf.presets.canonical(formalism)[source]#

Return the version name that formalism selects.

Parameters:

formalism (str, mapping, or None) – A version name ("IIT_3_0"), the name a preset is exported under ("iit3"), or a preset itself (pyphi.iit3), or an unmodified copy of one. Names are matched without regard to case.

Returns:

str or None – The version name, a key of by_name. None if formalism is None.

Raises:

ValueError – If formalism selects no known version, or is a mapping that differs from the preset of the version it names.

Return type:

str | None