A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.pytorch.org/docs/stable/generated/torch.lcm.html below:

torch.lcm — PyTorch 2.8 documentation

Computes the element-wise least common multiple (LCM) of input and other.

Both input and other must have integer types.

Note

This defines l c m ( 0 , 0 ) = 0 lcm(0, 0) = 0 lcm(0,0)=0 and l c m ( 0 , a ) = 0 lcm(0, a) = 0 lcm(0,a)=0.

>>> a = torch.tensor([5, 10, 15])
>>> b = torch.tensor([3, 4, 5])
>>> torch.lcm(a, b)
tensor([15, 20, 15])
>>> c = torch.tensor([3])
>>> torch.lcm(a, c)
tensor([15, 30, 15])

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4