message_ix_models.model.transport.factor.Omit

class message_ix_models.model.transport.factor.Omit(**kwargs)[source]

Bases: Layer

A layer that excludes 1 or more labels along dim.

Example

>>> factor.Omit(x=["x1", "x3"])
__init__(**kwargs)[source]

Methods

__init__(**kwargs)

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

dim

Dimension along which to omit labels.

labels

Specific labels or coords to omit.

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() using operation.

dim: str

Dimension along which to omit labels.

labels: list

Specific labels or coords to omit.

operation(b, /)

Same as a ** b.

quantify(coords)[source]

Return a quantification of the layer.

The returned value:

  • May have any of the dimensions indicated by coords.

  • For such dimensions, should have some or all of the labels in coords.

Subclasses must implement this method.