Protocols¶
Cross-cutting capability protocols for exponential families.
These protocols express optional capabilities that cut across the main inheritance
hierarchy. They exist because Python lacks intersection types — a class can be
both an ExponentialFamily and support StatisticalMoments, but the type
system cannot express that constraint directly.
- class StatisticalMoments(*args, **kwargs)[source]¶
Protocol for distributions that can compute statistical moments.
This is a structural type: any class with matching
statistical_meanandstatistical_covariancemethods satisfies it, without explicit inheritance.