i trying append numpy.arrays
numpy.array
of numpy.arrays
, reason dimension supposed increase in not increasing.
i made prior post same list
of of numpy.arrays
, worked, since using way more numpy.ndarrays
1 in example, converted list numpy.arrays
make bit faster - container has shape (72,0,78,3).
example:
import numpy np nano_train_input = [] in range(974): nano_train_input.append(np.random.random((78,72,3))) input_train = np.array([np.empty((0,78,3)) in range(72)]) print input_train.shape raw_input("sadasd...") #print nano_train_input.shape = 0 j = 0 train in nano_train_input: row in train.reshape(72,78,3): #print row.reshape(1,78,3).shape input_train[i]= np.concatenate((input_train[i],row.reshape(1,78,3)),axis=0) = i+1 print input_train[0].shape i=0 print input_train[0].shape
problem after concatenate input_train[0].shape still (0,78,3) , not desired (974,78,3)... how fix that?
i intend on converting input_train list, should possible numpy.tolist()
Comments
Post a Comment