尝试划分两个屏蔽数组时出现类型错误

时间:2021-06-14 10:21:37

标签: python division masked-array

我试图分割两个屏蔽数组但接收

TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

代码是

denominator = np.ma.dot(a_masked, b_masked)
numerator = np.abs(a_masked).sum(axis=1)
denominator[0]/numerator

你们中有人知道为什么会发生这种情况以及如何解决吗?

先谢谢你:)

0 个答案:

没有答案
相关问题