今天寫python代碼:
當用到math.log()函數值,總是出現如下錯誤:
TypeError: only length-1 arrays can be converted to Python scalars
原因:math.log()不能對矩陣進行直接操作。

經過測試,發現:
今天寫python代碼:
當用到math.log()函數值,總是出現如下錯誤:
TypeError: only length-1 arrays can be converted to Python scalars
原因:math.log()不能對矩陣進行直接操作。
經過測試,發現: