Python报错-TypeError: only integer scalar arrays can be converted to a scalar index

不能使用一个索引数组去索引一个列表,list和numpy的array是不一样的,转成np.array
例如:
obj = f[name]
arr = np.array(obj)
注意:
维度的转换
以下关于此错误的问答
具体细节在最佳回答处说明了
https://ask.csdn.net/questions/7974628?spm=1001.2014.3001.5505

你可能感兴趣的:(python,开发语言)