make_complex

Contents

make_complex#

tollan.utils.np.make_complex(real_part: npt.NDArray, imag_part: npt.NDArray) npt.NDArray[np.complexfloating][source]#

Create a complex array from real and imaginary parts.

Parameters:
  • real_part (ndarray) – Real component of the complex array

  • imag_part (ndarray) – Imaginary component of the complex array

Returns:

Complex array with specified real and imaginary parts

Return type:

ndarray[complexfloating]

Raises:

ValueError – If real and imaginary parts have different shapes