scipp.abs

scipp.abs

scipp.abs(x, *, out=None)

Element-wise absolute value.

Parameters
  • x (VariableLike) – Input data.

  • out (Optional[VariableLike]) – Optional output buffer.

Raises

If the dtype has no absolute value, e.g., if it is a string.

Returns

The absolute values of the input.

Seealso

scipp.norm() for vector-like dtype.

Return type

VariableLike