jax.numpy.gcd
Warning
This page was created from a pull request (#9655).
jax.numpy.gcdΒΆ
- jax.numpy.gcd(x1, x2)[source]ΒΆ
Returns the greatest common divisor of
|x1|
and|x2|
LAX-backend implementation of
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