Tensor.argmin

Tensor.argmin()
Returns:

the list of positions of the min and the min of all elements in the Tensor

Return type:

tuple

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.argmin()
# ([{'a': 0, 'b': 0}], 1.0)

Class

Tensor