Re: avoding the accumulation of array when using loop.

2013-01-02 Thread Isaac Won
On Wednesday, January 2, 2013 5:54:18 PM UTC-6, Dave Angel wrote: > On 01/02/2013 05:21 PM, Isaac Won wrote: > > > Hi all, > > > > > > Thanks to Hans, I have had a good progress on my problem. > > > > > > Followings are Hans's Idea: > > > > > > import numpy as np > > > > > > b = [] > >

Re: avoding the accumulation of array when using loop.

2013-01-02 Thread Dave Angel
On 01/02/2013 05:21 PM, Isaac Won wrote: > Hi all, > > Thanks to Hans, I have had a good progress on my problem. > > Followings are Hans's Idea: > > import numpy as np > > b = [] > c = 4 > f = open("text.file", "r") > > while c < 10: > c = c + 1 > > > f.seek(0,0) > >

avoding the accumulation of array when using loop.

2013-01-02 Thread Isaac Won
Hi all, Thanks to Hans, I have had a good progress on my problem. Followings are Hans's Idea: import numpy as np b = [] c = 4 f = open("text.file", "r") while c < 10: c = c + 1 f.seek(0,0) for columns in ( raw.strip().split() for raw in f ):