python: ascii read

Robert Kern rkern at ucsd.edu
Thu Sep 16 15:10:21 CEST 2004


Sebastian Krause wrote:
> The input data is is large ascii file of astrophysical parameters 
> (integer and float) of gaydynamics calculations. They should be read in 
> as an array of integer and float numbers not as string (as open() and 
> read() does). Then the array is used to make different plots from the 
> data and do some (simple) operations: subtraction and divison of 
> columns. I am using Scipy with Python 2.3.x under Linux (SuSE 9.1).

Well, one option is to use the "lines" argument to scipy.io.read_array 
to only read in chunks at a time. It probably won't help speed any, but 
hopefully it will be correct.

> Sebastian

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter



More information about the Python-list mailing list