TypeError: ufunc ‘multiply‘ did not contain a loop with signature matching types dtype(‘S32‘) dtype(
生活随笔
收集整理的這篇文章主要介紹了
TypeError: ufunc ‘multiply‘ did not contain a loop with signature matching types dtype(‘S32‘) dtype(
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
目錄
錯誤:
解決:
錯誤:
TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype('S32') dtype('S32') dtype('S32')
翻譯:TypeError: ufunc 'multiply' 不包含簽名匹配類型 dtype('S32') dtype('S32') dtype('S32') 的循環
解決:
避免這種情況的最簡單方法是首先將輸入字符串轉換為浮點數
x = np.asarray(x, dtype='float64')我通過此方式解決了問題,網上說的最多的就是 float() 解決,然而對我沒有用,希望這個方法能夠幫到大家解決問題。
總結
以上是生活随笔為你收集整理的TypeError: ufunc ‘multiply‘ did not contain a loop with signature matching types dtype(‘S32‘) dtype(的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql cve 2016 3521_
- 下一篇: R中‘ts‘ object must h