标签: python numpy
假设我已经有一个创建并分配给变量的列表。
example = [1, 2, 3, 4]
然后稍后在我的代码中,我要将其转换为数组。哪个是更好的做法?
example = np.array(example) #or example = np.asarray(example)
还是还有另一种更好的方法?