Computes the element-wise greatest common divisor (GCD) of input
and other
.
Both input
and other
must have integer types.
Note
This defines g c d ( 0 , 0 ) = 0 gcd(0, 0) = 0 gcd(0,0)=0.
>>> a = torch.tensor([5, 10, 15]) >>> b = torch.tensor([3, 4, 5]) >>> torch.gcd(a, b) tensor([1, 2, 5]) >>> c = torch.tensor([3]) >>> torch.gcd(a, c) tensor([1, 1, 3])
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