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
It seems there is no gcd function yet in numpy. However, there is a gcd function in fractions module. If you need to perform gcd on numpy arrays, you could build a ufunc using it:
ufunc
gcd = numpy.frompyfunc(fractions.gcd, 2, 1)