且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Python:矩阵列表到numpy数组?

更新时间:2023-11-25 23:27:10

b = np.asarray(a, dtype=float)
#to get the same shape do.
b = b.reshape(-1, len(b)) 
#to just get one dimmension do. 
b = np.asarray(a, dtype=float).reshape(len(a))