我有一个numpy数组的字符串表示形式。如何从这种格式转换为数组数组?
使用eval是最好的解决方案
import numpy as np a = "np.array([[1,2],[2,3]])" a = eval(a)