Re: [Numpy-discussion] .transpose() of memmap array fails to close()

2007-08-13 Thread Anne Archibald
On 13/08/07, Glen W. Mabey <[EMAIL PROTECTED]> wrote: > As I have tried to think through what should be the appropriate > behavior for the returned value of __getitem__, I have not been able to > see an appropriate solution (let alone know how to implement it) to this > issue. Is the problem one

Re: [Numpy-discussion] Vectorize leaks

2007-08-13 Thread David Huard
Hi Chris, Same problem for ubuntu linux. Darn, I spent an hour tracking this bug and now I see you found it before... 2007/8/13, Chris Fonnesbeck <[EMAIL PROTECTED]>: > > I have narrowed a memory leak in PyMC down to the vectorize() function > in numpy. I have a simple inverse logit transformati

Re: [Numpy-discussion] .transpose() of memmap array fails to close()

2007-08-13 Thread Glen W. Mabey
On Mon, Aug 13, 2007 at 11:51:49AM -0400, Alan G Isaac wrote: > You have not heard from anyone on this yet, right? Nope, but I'm glad to hear even this response. > Please continue to post your findings. At this point, I'm guessing that the __getitem__() method of ndarray returns a numpy.memmap i

Re: [Numpy-discussion] .transpose() of memmap array fails to close()

2007-08-13 Thread Alan G Isaac
On Fri, 10 Aug 2007, "Glen W. Mabey" apparently wrote: > It seems that any slice of a numpy.memmap that is greater than 1-d has > a similar problem. > In [1]:import numpy > In [2]:amemmap = numpy.memmap( '/tmp/afile', dtype=numpy.float32, > shape=(4,5), mode='w+' ) > In [3]:amemmap[1,3:4] >

[Numpy-discussion] f2py and string arrays

2007-08-13 Thread Mark.Miller
Quick question... I have a Fortran function for f2py declared as follows (just an example). module test1 contains subroutine manip(length, array, a, b) integer :: length, a,b character(length) :: array(0:a-1,0:b-1) !f2py intent(in) length,a,b !f2py intent(inout) array

[Numpy-discussion] Vectorize leaks

2007-08-13 Thread Chris Fonnesbeck
I have narrowed a memory leak in PyMC down to the vectorize() function in numpy. I have a simple inverse logit transformation function: invlogit = lambda x: 1.0 / (1.0 + exp(-1.0 * x)) which runs without leaking when used iteratively during simulations. However, when I try to vectorize it, the

Re: [Numpy-discussion] [f2py] Adding custom code in module initialization code

2007-08-13 Thread David Cournapeau
David Cournapeau wrote: > Pearu Peterson wrote: > >> On Mon, August 13, 2007 8:43 am, David Cournapeau wrote: >> >> >>> Hi, >>> >>> I would like to know if it is possible to tell f2py to call some >>> functions inside the initialization function of a module ? I found a >>> mention to

Re: [Numpy-discussion] [f2py] Adding custom code in module initialization code

2007-08-13 Thread David Cournapeau
Pearu Peterson wrote: > On Mon, August 13, 2007 8:43 am, David Cournapeau wrote: > >> Hi, >> >> I would like to know if it is possible to tell f2py to call some >> functions inside the initialization function of a module ? I found a >> mention to add some function to the module function list