from scipy import * import time # Read data in from file t1 = time.time() data = [] inputfile = open("300K.dat") colmNames = inputfile.next().strip().split("\t") for line in inputfile: data.append(map(float,line.strip().split("\t")[1:])) inputfile.close() t2 = time.time() print "To read in data: %.1f s" % (t2-t1) # For ultimate memory efficiency, it should be possible to create the # array as the file is read in, but for the moment... data = array(data)