message_ix_models.model.transport.operator.maybe_select
- message_ix_models.model.transport.operator.maybe_select(qty: AnyQuantity, *, indexers: dict) AnyQuantity [source]
Select from qty if possible, using
"*"
wildcard.Same as
genno.operator.select()
, except:If not all the dimensions of indexers are in qty, no selection is performed.
For each dimension of indexers, if the corresponding (scalar) value is not present in qty, it is replaced with “*”. qty should contain this value along every dimension to be selected; otherwise, the result will be empty.