jax.lax.abs#
- jax.lax.abs(x)[source]#
Elementwise absolute value: \(|x|\).
This function lowers directly to the stablehlo.abs operation.
- Parameters:
x (ArrayLike) – Input array. Must have signed integer, floating, or complex dtype.
- Returns:
An array of the same shape as
x
containing the elementwise absolute value. For complex valued input, \(a + ib\),abs(x)
returns \(\sqrt{a^2+b^2}\).- Return type:
See also
jax.numpy.abs()
: a more flexible NumPy-styleabs
implementation.