[NumPy-Tickets] [NumPy] #2048: memory overflow when using numpy load in a loop
NumPy Trac
numpy-tickets@scipy....
Sat Feb 11 19:56:30 CST 2012
#2048: memory overflow when using numpy load in a loop
---------------------------------------------------+------------------------
Reporter: eldada | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.lib | Version: 1.5.1
Keywords: load, memory, leak, overflow, NpzFile |
---------------------------------------------------+------------------------
Comment(by eldada):
I have posted the question on http://stackoverflow.com/a/9245218/1204331
and received an answer with a solution + a general way to solve similar
issues.
The specific solution is to delete data.f
After testing the solution proposed by pv (to gc.collect in the loop) I
found that the del data.f solution is about 2000 times faster. The other
proposed solution by pv (data.f=None) is as fast as deletion. I wonder why
would the NpzFile class would be coded in a cyclic referring manner.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/2048#comment:2>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list