An ASCII file has 61 columns, from which the columns are read using readlines(). The user has the option to specify how many columns to use to create an n-dimennsional array based on his/her choice of number of columns.
I want to create a dynamic n-dimensional array such as:
from numpy import *
FILE = open('test.txt','rb')
Choice = float(raw_input('How many columns do you want to use: \t'))
A = [[],[],[],...] # N-dimensional array (rows = 486, columns = N)
such that A has the dimensions based on the user's choice 'Choice'. 'N' can change between 1 and 61. How could I go about doing this?
-Thanks!