"CC" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I wanna compile a 6000x1000 array with python. The array starts from > 'empty', each time I get a 6000 length list, I wanna add it to the > exist array as a column vector. Is there any function to do so? > > Or, I can add the list as a rows, if this is easier, and transpose the > whole array after all the rows are setup.
Python does not come with a 2D array type either as a builtin type or as a standard library module. You can only simulate one with a sequence of sequences (list of lists, for instance). You could initialize as follows: aray = [] for l6000 in source(): aray.append(l6000) While this will print as a list of rows, you are free to think of it as a list of columns. That said, I suspect you should use the 3rd party NumPy package which defines multiple-dimensional arrays of several base types. Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list
