写在Python程序时,遇到了这个问题。
还有类似问题:
TypeError: 'tuple' object is not callable
这是因为调用了:
print(coef.size()) print(freqs.shape())
而应该调用:
print(coef.size) print(freqs.shape)
这里的size和shape分别是Int类型和tuple类型的数据,而不是一个函数。

写在Python程序时,遇到了这个问题。
还有类似问题:
TypeError: 'tuple' object is not callable
这是因为调用了:
print(coef.size()) print(freqs.shape())
而应该调用:
print(coef.size) print(freqs.shape)
这里的size和shape分别是Int类型和tuple类型的数据,而不是一个函数。