[SciPy-user] read ascii data

Xavier Barthelemy xavier.barthelemy@cmla.ens-cachan...
Wed Dec 12 06:57:32 CST 2007


in scipy, or numpy I can't recall, there's a function name io.read_array


columns and lines can be all like int his example, or you can just 
choose where to begin and where to end, or just a discrete list.

check the Doc, it is relatively well explained


Christoph Scheit a écrit :
> Hi All,
> I have a file containing ascii data related to a block-structured grid.
> I could use readtxt, but I would like to have the possibility to read only
> a certain range of rows out of the file. Lets say I have ten blocks in my grid
> and each block 10 rows of data.
> So in one read I would like to read for instance line 30 to line 39
> I can use skip rows, but how can I limit the loadtxt to the upper limit?
> Is there something already available or do I have to do it on my own?
> Thanks in advance,
> Christoph
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user

More information about the SciPy-user mailing list