python - 尝试划分两个屏蔽数组时出现类型错误
问题描述
我正在尝试划分两个蒙面数组但接收
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
你们中有人知道为什么会发生这种情况以及如何解决吗?
先感谢您 :)
解决方案
推荐阅读
- c# - 在 word addin 中查找并突出显示问题
- oracle - Oracle OCCI 无法正确检索小数点后的值
- c++ - 无法在 Visual Studio 和 vcpkg 中构建 cmake 项目(致命错误 C1083)
- angular - 在 ionic 3 中将 QR 码发送到电子邮件
- angular - 使用元素名称将属性绑定到元素的子元素 | 角 5
- php - 如何检查第一个 $_GET 的值并打印或检查第二个并打印值是否不同?
- python - 如何使用 pandas 解析嵌套 json 中的选定值
- php - Symfony 将子域定向到路由
- angular - Angular 2 Web 应用程序与本地 ADFS 2.0 集成
- c# - Docusign RestAPI - 将通知发送到另一封电子邮件