-3
我有一个简单的脚本返回不少误区:什么错这个python脚本
import numpy as np
def test(array):
ncol=np.shape(array)[1]
return ncol
这应该返回数组的列数。它有什么问题?数组是numpy数组。下面是输出:
ncol=np.shape(array)[1] Display all 195 possibilities? (y or n) ArithmeticError( continue AssertionError( copyright( AttributeError( credits( BaseException( def BlockingIOError( del
它返回什么错误? 'array'的价值是什么? – msanford
我添加了错误。数组是一个numpy数组 –
你如何使用脚本?你为了获得上述错误而发布的显式命令是什么? –