异常和警告#

NumPy使用的通用异常.请注意,某些异常可能是模块特定的,例如线性代数错误.

在 NumPy 版本加入: 1.25

exceptions 模块是 NumPy 1.25 中的新增功能.较旧的异常仍然可以通过主 NumPy 命名空间获得,以实现兼容性.

警告#

ComplexWarning 

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

VisibleDeprecationWarning 

可见的弃用警告.

RankWarning 

矩阵秩警告.

异常#

AxisError (axis[, ndim, msg_prefix])

提供的轴无效.

DTypePromotionError 

无法将多个 DType 转换为通用 DType.

TooHardError 

超过了 max_work .