I have a 2D list something like
a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
and I want to convert it to a 2d numpy array. Can we do it without
I am using large data sets exported to a python file in the form
XVals1 = [.........] XVals2 = [.........]
Each list is of identical length. I use
>>> a1 = np.array(SV.XVals1) >>> a2 = np.array(SV.XVals2)
Then
>>> A = np.matrix([a1,a2])