numpy.exceptions.ComplexWarning
- exceptionexceptions.ComplexWarning[source]
-
The warning raised when casting a complex dtype to a real dtype.
As implemented, casting a complex number to a real discards its imaginary part, but this behavior may not be what the user actually wants.
© 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/2.0/reference/generated/numpy.exceptions.ComplexWarning.html