LabelizedVariable.changeLabel

LabelizedVariable.changeLabel(pos, aLabel)

Change the label at the specified index

Parameters:
  • pos (int) – the index of the label to be changed

  • aLabel (str) – the label to be added to the labelized variable

Raises:
Return type:

None

Example

import pyagrum as gum

c = gum.LabelizedVariable("c", "color", ["red", "green", "blue"])
c.changeLabel(1, "yellow")
print(c)
# c:Labelized({red|yellow|blue})

Class

LabelizedVariable