jax.lax.div#
- jax.lax.div(x, y)[source]#
Elementwise division: \(x \over y\).
This function lowers directly to the stablehlo.divide operation.
Integer division overflow (division by zero or signed division of INT_SMIN with -1) produces an implementation defined value.
- Parameters:
x (ArrayLike) – Input arrays. Must have matching numerical dtypes. If neither is a scalar,
x
andy
must have the same number of dimensions and be broadcast compatible.y (ArrayLike) – Input arrays. Must have matching numerical dtypes. If neither is a scalar,
x
andy
must have the same number of dimensions and be broadcast compatible.
- Returns:
An array of the same dtype as
x
andy
containing the quotient of each pair of broadcasted entries. For integer inputs, any fractional part is discarded.- Return type:
See also
jax.numpy.divide()
: NumPy-style true division supporting inputs with mixed dtypes and ranks.jax.numpy.floor_divide()
: NumPy-style floor division supporting inputs with mixed dtypes and ranks.