abs

Graph.abs(x, *, name=None)

Calculate the element-wise absolute value of an object. This can be a number, an array, a tensor, or a time-dependent function in the form of a Pwc or an Stf.

Parameters

  • x (number or np.ndarray or Tensor or Pwc or Stf) – The object whose absolute value you want to calculate, xx
  • name (str or None , optional) – The name of the node. You can only provide a name if the object is not an Stf.

Returns

The element-wise absolute value, x\left|x\right|

Return type

Tensor or Pwc or Stf

SEE ALSO

Graph.angle : Argument of a complex object.

Graph.complex_value : Create a complex object from its real and imaginary parts.

Was this useful?