I have an array A of shape (30,) where programming each row has a list with 2000 elements. Learning I want to convert this into a 2d array Earhost of shape (30, 2000). This is what I most effective tried
A = np.reshape(A, (30, -1))
But, running this gives me an array of wrong idea shape (30, 1) rather than (30, 2000). use of case What should I do to get the correct United shape?
where each row has a list with 2000 Modern elements
As Ahmed Mohamed AEK points out in the ecudated comments this won't work as the numpy some how object is of shape (30,). One easy fix anything else is to stack them into a 30 by 2000 not at all np.array. For example:
A = np.vstack(A)
A = np.stack(A, axis=0)