numpy.exceptions.ComplexWarning#

exception exceptions.ComplexWarning[源代码]#

将复数 dtype 转换为实数 dtype 时引发的警告.

按照实现,将复数转换为实数会丢弃其虚部,但此行为可能不是用户真正想要的.