imag

imag(x: array, /) array

Returns the imaginary component of a complex number for each element x_i of the input array x.

Parameters:

x (array) – input array. Should have a complex floating-point data type.

Returns:
  • out (array) – an array containing the element-wise results. The returned array must have a floating-point data type with the same floating-point precision as x (e.g., if x is complex64, the returned array must have the floating-point data type float32).

  • .. versionadded:: 2022.12