I have a list of arrays that I would like to be reshaped. Each array is a trial, the columns within each array is a feature, and the rows in each array is the timestep. I would like the list reshaped to (trial, timestep, feature). As an example, D is what I am trying to convert to a 3D array - the timesteps are not uniform.
A = np.random.rand(3,10) #Trial 1 has 3 timesteps and ten features
B = np.random.rand(10,10) #Trial 2 has 10 timesteps and ten features
C = np.random.rand(7,10) #Trial 3 has 7 timesteps and ten features
D = [A,B,C,D] #Data as given in the form of a list
How am I able to get a 3d array with variable timesteps? I am trying to use this an input to a keras neural network