python - How do I easily convert a numpy.ndarray to a list of numpy.array? -
i struggling parsing data training framework.
the problem framework not able handle ndarray. need convert list of array. input , output data stored 2 seperate lists of numpy.ndarray.
the input data has converted list of numpy array each array contains column of ndarray.
the output data has converted list of numpy arrays each array contains rows of ndarray?..
is possible convert this?
when print train_output_data[0] this:
assuming ip
, op
input list , output lists respectively,
newinput = [ip[:,i] in range(ip.shape[0])] newoutput = [x x in op]
if train_output_data
, train_input_data
lists of 2d numpy.ndarray
's, alternative can be
newinput = [] ip in train_input_data: newinput.append([ip[:,i] in range(ip.shape[0])]) newoutput = [] op in train_output_data: newoutput.append([x x in op])
Comments
Post a Comment