Python, unsupported operand type(s) for *: ‘int‘ and ‘NoneType‘

File "<__array_function__ internals>", line 6, in dot
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

使用dot时,左右两边类型不同,函数没有返回值,默认返回None

一般出现:TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'。都是返回值为 None 了

猜你喜欢

转载自blog.csdn.net/stellao_o/article/details/122955528