Hi all
I seem to have tracked down a memory leak in the string conversion mechanism
of numpy. It is demonstrated using the following code:
import numpy as np
a = np.array([1.0, 2.0, 3.0])
while True:
b = str(a)
What happens above is that is repeatedly converted to a string. The process
size
Hi,
> I seem to have tracked down a memory leak in the string conversion mechanism
> of numpy. It is demonstrated using the following code:
>
> import numpy as np
>
> a = np.array([1.0, 2.0, 3.0])
> while True:
> b = str(a)
Would you not expect python rather than numpy to be dealing with the
Robert Crida wrote:
> Hi all
>
> I seem to have tracked down a memory leak in the string conversion
> mechanism of numpy. It is demonstrated using the following code:
>
> import numpy as np
>
> a = np.array([1.0, 2.0, 3.0])
> while True:
> b = str(a)
>
> What happens above is that is repeatedl
Hi
I don't think it is a python issue because if you change the line b = str(a)
to just read
str(a)
then the problem still occurs.
Also, if you change a to be a list instead of ndarray then the problem does
not occur.
Cheers
Robert
On 10/26/07, Matthew Brett <[EMAIL PROTECTED]> wrote:
>
> Hi,
Robert Crida wrote:
> Hi
>
> I don't think it is a python issue because if you change the line b =
> str(a) to just read
> str(a)
> then the problem still occurs.
>
> Also, if you change a to be a list instead of ndarray then the problem
> does not occur.
How do you know there is a memory leak ?
On 10/26/07, Robert Crida <[EMAIL PROTECTED]> wrote:
> Hi again
>
> I watch the VmSize of the process using eg top or ps
>
> If a is a list then it remains constant. If a is an ndarray as shown in the
> example, then the VmSize grows quite rapidly.
>
Actually, I did a typo while copying your exampl
On 10/26/07, David Cournapeau <[EMAIL PROTECTED]> wrote:
> On 10/26/07, Robert Crida <[EMAIL PROTECTED]> wrote:
> > Hi again
> >
> > I watch the VmSize of the process using eg top or ps
> >
> > If a is a list then it remains constant. If a is an ndarray as shown in the
> > example, then the VmSize
Hi again
I watch the VmSize of the process using eg top or ps
If a is a list then it remains constant. If a is an ndarray as shown in the
example, then the VmSize grows quite rapidly.
Cheers
Robert
On 10/26/07, David Cournapeau <[EMAIL PROTECTED]> wrote:
>
> Robert Crida wrote:
> > Hi
> >
> > I
I can confirm the same behaviour with numpy '1.0.4.dev4271' on OS X
10.4with python
2.5.1 (installer from python.org).
For me the memory used by the python process grows at about 1MB/sec. The
memory isn't released when the loop is canceled.
___
Numpy-dis
Hi all
I recently posted about a memory leak in numpy and failed to mention the
version. The leak manifests itself in numpy-1.0.3.1 but is not present in
numpy-1.0.2
The following code reproduces the bug:
import numpy as np
a = np.array([1.0, 2.0, 3.0])
while True:
b = str(a)
What happens
Which version Python are you using ?
Matthieu
2007/10/26, Robert Crida <[EMAIL PROTECTED]>:
>
> Hi all
>
> I recently posted about a memory leak in numpy and failed to mention the
> version. The leak manifests itself in numpy-1.0.3.1 but is not present in
> numpy-1.0.2
>
> The following code repr
On 10/26/07, Robert Crida <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I recently posted about a memory leak in numpy and failed to mention the
> version. The leak manifests itself in numpy-1.0.3.1 but is not present in
> numpy-1.0.2
>
> The following code reproduces the bug:
>
> import numpy as np
>
>
On Friday 26 October 2007 05:39, Robert Crida wrote:
> Hi all
>
> I recently posted about a memory leak in numpy and failed to mention the
> version. The leak manifests itself in numpy-1.0.3.1 but is not present in
> numpy-1.0.2
>
> The following code reproduces the bug:
>
> import numpy as np
>
>
On Friday 26 October 2007 05:39, Robert Crida wrote:
> I recently posted about a memory leak in numpy and failed to mention the
> version. The leak manifests itself in numpy-1.0.3.1 but is not present in
> numpy-1.0.2
>
> The following code reproduces the bug:
>
> import numpy as np
>
> a = np.arra
I opened a ticket for this (#602). Hopefully someone will confirm that adding
that Py_DECREF call fixes the leak and someone with write access patches it
in svn.
- Karol
--
written by Karol Langner
Sun Oct 28 23:29:18 EDT 2007
___
Numpy-discussion ma
Karol Langner wrote:
> I opened a ticket for this (#602). Hopefully someone will confirm that adding
> that Py_DECREF call fixes the leak and someone with write access patches it
> in svn.
>
Thanks for looking into this and isolating the problem...
-Travis O.
__
Hi Karol
Thank you very much for the sleuth work here. We are in the midst of
software ATP so it helps a lot that I will be able to resolve this bug
properly.
Robert
On 10/29/07, Karol Langner <[EMAIL PROTECTED]> wrote:
>
> I opened a ticket for this (#602). Hopefully someone will confirm that
>
17 matches
Mail list logo