DiscreteVariable.label
- DiscreteVariable.label(i)
- Parameters:
i (
int) – the index of the label we wish to return- Returns:
the label at the given index
- Return type:
str- Raises:
pyagrum.OutOfBounds – If the variable does not contain the label
Example
import pyagrum as gum
v = gum.fastVariable("c{red|green|blue}")
v.label(1)
# 'green'
gum.fastVariable("x[0:10:5]").label(1)
# '[2;4['
Class
Overridden in
DiscretizedVariable.label, IntegerVariable.label, LabelizedVariable.label, NumericalDiscreteVariable.label, RangeVariable.label