latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.lcm
- tensorplay.functional.lcm(input, other, *, out=None) Tensor[source]
Computes the element-wise least common multiple (LCM) of
inputandother.Both
inputandothermust have integer types.Note
This defines and .
- Parameters:
- Keyword Arguments:
out (Tensor, optional) – the output tensor.
Example:
>>> a = tensorplay.tensor([5, 10, 15]) >>> b = tensorplay.tensor([3, 4, 5]) >>> tensorplay.lcm(a, b) tensor([15, 20, 15]) >>> c = tensorplay.tensor([3]) >>> tensorplay.lcm(a, c) tensor([15, 30, 15])
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

