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.

  1. the input data has converted list of numpy array each array contains column of ndarray.

  2. 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:

https://ufile.io/fa816

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

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

php - How to display all orders for a single product showing the most recent first? Woocommerce -