trial=[]
for i in range(100):
trial.append(np.array([1,2,5]))
trial=np.array(trial)
The output of trial.shape
is (100,3)
. But what I want is (3,100)
. I know that is not how the append works. Could you please point me to this kind of adding to a list.
Edit: Actually, I'm doing this:
firststep=[]
for i in range(bunchoffilters1.shape[0]):
firststep.append(convolution(image,kernel=bunchoffilters1[i],non_linearity='sigmoid'))
Here, the convolution function returns 16*16 output and append gives me (30,16,16)
after for loop. (bunchoffilters1.shape[0]=30)
. What I want is (16,16,30). Transposing might not give me correct answer as it will retain the 2nd dimension same(0,1,2)->(2,1,0)
rather than getting (0,1,2)->(1,2,0)