Tensor.log2
- Tensor.log2()
log2 all the values in the Tensor
Warning
When the Tensor contains 0 or negative values, no exception are raised but
-infornanvalues are assigned.- Return type:
Example
import pyagrum as gum
a = gum.LabelizedVariable("a", "a", 3)
p = gum.Tensor().add(a).fillWith([1, 2, 8])
p.log2() # in place
p.tolist()
# [0.0, 1.0, 3.0]
Class