is there something i can do to prevent the following script from leaking memory?

Laurent

from rpy2.robjects import r,RVector,RDataFrame
from rpy2.rlike.container import TaggedList
from math import sin
import array

size=100
xx=[]
for x in range(size):
    xx.append(RVector(array.array('f',[sin(0.1*(y+x))for y in range(1000)])))



formula='x%s~%s'%(0,'+'.join(['x%d'%(i+1) for i in range(size-1)]))

t=['x%d'%i for i in range(size)]
df=RDataFrame(TaggedList(xx,tags=t))

done=False
i=0
while not done:
    print i
    i=i+1
    model=r.lm(formula,df)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to