例外與警告 (numpy.exceptions)#

NumPy 使用的一般例外。請注意,某些例外可能是模組特定的,例如線性代數錯誤。

NumPy 版本新增1.25

例外模組在 NumPy 1.25 版本中是新的。為了相容性,舊的例外仍然可以透過主要的 NumPy 命名空間使用。

警告#

ComplexWarning

當將複數 dtype 轉換為實數 dtype 時引發的警告。

VisibleDeprecationWarning

可見的棄用警告。

RankWarning

矩陣秩警告。

例外#

AxisError(axis[, ndim, msg_prefix])

提供的軸無效。

DTypePromotionError

多個 DType 無法轉換為一個通用的 DType。

TooHardError

超過 max_work。