From: Mathew Y. <my...@jp...> - 2006-11-15 21:35:34
|
Stefan van der Walt wrote: > On Wed, Nov 15, 2006 at 02:33:52PM -0600, Robert Kern wrote: > =20 >> Mathew Yeates wrote: >> =20 >>> Hi >>> I'm running a 64 bit Python 2.5 on an x86 with Solaris. I have a=20 >>> function I call over 2^32 times and eventually I run out of memory. >>> >>> The function is >>> def make_B(deltadates): >>> numcols=3Ddeltadates.shape[0] >>> B=3Dnumpy.zeros((numcols,numcols)) >>> for ind in range(0,numcols): #comment out this loop and all is go= od >>> B[ind,0:numcols] =3D deltadates[0:numcols] >>> return B >>> >>> >>> If I comment out the loop lines, my memory is okay. I'm guessing that= a=20 >>> reference is being added to "deltadates" and that the reference count= is=20 >>> going above 2^32 and reseting. Anybody have any ideas about how I can= =20 >>> cure this? Is Numpy increasing the reference count here? >>> =20 >> Can you give us a small but complete and self-contained script that de= monstrates >> the problem? >> =20 > > I think this might be related to ticket #378: > > http://projects.scipy.org/scipy/numpy/ticket/378 > > Cheers > St=E9fan > =20 okay. attached is the smallest program I could make. Before running you=20 will need to create a file named biggie with 669009000 non zero floats. Mathew |