Does numpy have a gcd function somewhere in its structure of modules?
numpy
gcd
I\'m aware of fractions.gcd but thought a numpy
fractions.gcd
Public service announcement for anyone using Python 3.5
from math import gcd gcd(2, 4)
And if you want to write it yourself in a one-liner:
def gcd(a: int, b: int): return gcd(b, a % b) if b else a