今天写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()不能对矩阵进行直接操作。
经过测试,发现: