Tensor.nbrDim
- Tensor.nbrDim(*args)
- Returns:
the number of vars in the multidimensional container.
- Return type:
int
Example
import pyagrum as gum
a, b = gum.LabelizedVariable("a", "a", 2), gum.LabelizedVariable("b", "b", 3)
p = gum.Tensor().add(a).add(b).fillWith([1, 2, 3, 4, 5, 6])
p.nbrDim()
# 2
Class