LabelizedVariable.label

LabelizedVariable.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

c = gum.LabelizedVariable("c", "color", ["red", "green", "blue"])
c.label(1)
# 'green'

Class

LabelizedVariable