Expert layer: conatus.expert

import conatus.expert as ex          # or: from conatus.expert import *

The expert layer is the mathematical intermediate representation that native models compile to, together with every toolkit that operates on it. Use it to write a problem term by term (bases, tau variables and lifts chosen by hand), to reach options the native layer does not expose, or to apply a toolkit to m.compile(N).problem or sim.solver.

A name reachable in both layers means the same thing in both: the same object, or, for discretize, linearize, methods and verify, the package cn.<name> whose call is the function conatus.expert.<name> (cn.discretize(problem) works; cn.discretize.Plan too). conatus.api is the former name of the expert layer: it still works, with a FutureWarning, and will be removed. Two names keep their former meaning only there: sensitivity (now the package conatus.sensitivity; the dense-eigenproblem helper is conatus.solvers.sensitivity) and Channel (now ChannelBaseFlow; cn.Channel is the native geometry).

conatus.expert re-exports, under their own names, the public objects of the user-facing modules that this documentation shows, and adds nothing. Since 0.2 the list is reviewed name by name: a helper, a constant or a result type that no page shows stays in its module (conatus.nonmodal.ResolventModes, conatus.timestep.rk_tableau); written as conatus.expert.<name> it still works in 0.2, with a DeprecationWarning that names the module, and stops working in 0.3. Every exception and warning class of conatus.errors is exported (each has its entry in Errors and what they mean). The Studio’s telemetry and wire protocol are not part of the expert layer: they are conatus.telemetry. The modules themselves stay reachable as attributes (conatus.expert.ecs, conatus.expert.provenance), but their canonical name is conatus.<module>. Name clashes are never resolved silently; conatus.expert.explain() lists them:

  • two modules export different objects under the same name: the first one is kept, the other stays reachable as conatus.<module>.<name>;

  • a name with two unrelated meanings is not exported at all: record is refused (AmbiguousNameError); the run provenance record is exported as provenance_record, and the telemetry frame is conatus.telemetry.record;

  • an object named like a module (linearize, discretize, methods): the module stays conatus.<module>, callable as the function;

  • generic helpers stay in their module; the run registry is a module, conatus.expert.runs (= cn.runs). The compiled runtime and the MPI backend are left out of the single import.

conatus.expert.explain()[source]

What the single import contains, and every name that is reachable only through its module.

Return type:

str