jax.numpy.gcd#
- jax.numpy.gcd(x1, x2)[source]#
Returns the greatest common divisor of
|x1|
and|x2|
LAX-backend implementation of
numpy.gcd()
.Original docstring below.
- Parameters:
x1 (array_like, int) – Arrays of values. If
x1.shape != x2.shape
, they must be broadcastable to a common shape (which becomes the shape of the output).x2 (array_like, int) – Arrays of values. If
x1.shape != x2.shape
, they must be broadcastable to a common shape (which becomes the shape of the output).
- Returns:
y – The greatest common divisor of the absolute value of the inputs This is a scalar if both x1 and x2 are scalars.
- Return type:
ndarray or scalar