Returns the greatest common divisor of |x1|
and |x2|
Arrays of values. If x1.shape != x2.shape
, they must be broadcastable to a common shape (which becomes the shape of the output).
The greatest common divisor of the absolute value of the inputs This is a scalar if both x1 and x2 are scalars.
See also
lcm
The lowest common multiple
Examples
>>> import numpy as np >>> np.gcd(12, 20) 4 >>> np.gcd.reduce([15, 25, 35]) 5 >>> np.gcd(np.arange(6), 20) array([20, 1, 2, 1, 4, 5])
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