bug代码如下:
n = y.shape(0)
错误在于,shape后应该用 [ ] 而非 ( )。
改正的代码:
n = y.shape[0]
注意与MATLAB语法区分
具体原因见大佬的解释:TypeError系列之:TypeError: ‘tuple’ object is not callable.
bug代码如下:
n = y.shape(0)
错误在于,shape后应该用 [ ] 而非 ( )。
改正的代码:
n = y.shape[0]
注意与MATLAB语法区分
具体原因见大佬的解释:TypeError系列之:TypeError: ‘tuple’ object is not callable.