bellini.distributions.TransformedDistribution¶
- class bellini.distributions.TransformedDistribution(args, op, **kwargs)[source]¶
Bases:
bellini.distributions.DistributionA transformed distribution from one base distribution. While originally intended as a generalized form of distribution transformations such as log or exp, this type is practically a wrapper for any numpy operation on a stochastic value. For example, this allows for the concatenation of Distributions and Quantities.
NOTE: This is only designed to work with np function that output one output. Behavior hasn’t been tested for np functions that return multiple outputs.
- __init__(args, op, **kwargs)[source]¶
- Parameters
args (list of Distribution or Quantity) – The Distributions/Quantities needed as arguments for op
op (str) – Name of the numpy function to use. See
bellini.api.functionalfor more information**kwargs – Any keyword args needed for op
Methods
__init__(args, op, **kwargs)- Parameters
args (list of Distribution or Quantity) – The Distributions/Quantities needed as arguments for op
to_units(new_units[, force])Return self converted to units new_units
unitless()Return a unitless version of self
Attributes
The Distribution’s dimensionality (e.g.
A networkx graph describing the computation graph used to create this Distribution
The units associated with internal computations in Bellini for this Distribution
A quantity (array-like or scalar) with the same shape as expected samples from this Distribution
A string representing the name of self
The shape of samples from this Distribution
The units of this Distribution (e.g.
- property dimensionality¶
The Distribution’s dimensionality (e.g. ‘length’ for meter)
- property g¶
A networkx graph describing the computation graph used to create this Distribution
- property internal_units¶
The units associated with internal computations in Bellini for this Distribution
- property magnitude¶
A quantity (array-like or scalar) with the same shape as expected samples from this Distribution
- property name¶
A string representing the name of self
- property shape¶
The shape of samples from this Distribution
- property units¶
The units of this Distribution (e.g. molar)