mrkn / pycall.rb

Calling Python functions from the Ruby language
MIT License
1.05k stars 72 forks source link

Memory issue #164

Closed sebfie closed 1 year ago

sebfie commented 1 year ago

Hello,

I have an issue on my memory using pycall :

I have an object @df of class <class 'pandas.core.series.Series'>

And then call :

@df.rolling(720).apply(proc { |x| t = Numpy.polyfit((0...x.size).to_a, x, 1); t[0] })

Everytime I call this, it will increase my process memory of about 40Mb. My @df is about 3300 elements

I suspect a memory leak issue but I do not know how to fix it !

thank you !

mrkn commented 1 year ago

@sebfie I've released v1.5.0. This new version includes #129 so Python objects memory leak should be resolved. Could you please check with the new version again?

sebfie commented 1 year ago

Thx a lot !