pyphi.provenance.HasProvenance#
- class pyphi.provenance.HasProvenance[source]#
Bases:
objectMixin for result types that carry a
Provenancerecord.Provides
with_provenance()so a user can record their own context (a free-formnote, theseedthey controlled) on a computed result.- with_provenance(**fields)[source]#
Update this result’s provenance record in place and return
self.fieldsare merged into the existing record, e.g.result.with_provenance(note="run 1", seed=42). Unknown field names raiseTypeError. Provenance is metadata, not part of the result’s value, so the update never affects equality, diffs, or stored goldens; updating in place (rather than copying the whole result) keeps that explicit.- Parameters:
fields (Any)
- Return type: