message_ix_models.model.transport.factor.Map
- class message_ix_models.model.transport.factor.Map(dim: str, values: dict[str, Layer] | None = None, **value_kwargs: Layer)[source]
Bases:
LayerA layer that maps to different
valuesalongdim.- Parameters:
dim (
str) – Dimension ID.values (optional) – Mapping from labels or coords along dim to other
Layerswhich produce the value(s) for those coords.**value_kwargs – Same as values, but as keyword arguments.
Example
>>> layer = factor.Map( ... "new_dim", ... x=factor.Constant(2.0, "y z"), ... x=factor.Constant(3.0, "y z"), ... )
Methods
__init__(dim[, values])apply(other, coords)quantify()this layer and combine it with other.operation(b, /)Same as a * b.
quantify(coords)Return a quantification of the layer.
Attributes
dimvalues- apply(other: AttrSeries, coords: Mapping[str, Any]) AttrSeries
quantify()this layer and combine it with other.Subclasses may override this method. The default implementation combines other with the results of
quantify()usingoperation.
- operation(b, /)
Same as a * b.