[Numpy-discussion] in1d for structure arrays

2010-10-19 Thread Jeremy Lewi
ng a structure field to keep track of which list the data came from and then making this field the lowest priority in the sort. Is this worth creating a ticket for? (I don't have trac privileges to do so) Jeremy Jeremy Lewi Engineering Scientist The Intellisis Corporat

Re: [Numpy-discussion] Re Dealloat Numy arrays in C

2010-04-01 Thread Jeremy Lewi
Thanks Robert. I ended up letting Python handle the memory management. In my C-extension I just call Py_INCREF to prevent Python from deallocating it while I'm using it. I then call Py_DECREF once I'm done with it. Jeremy ___ NumPy-Discussion mailing l

[Numpy-discussion] Dealloat Numy arrays in C

2010-03-31 Thread Jeremy Lewi
ay to ensure I'm using the correct memory deallocator for the buffer? i.e the deallocator for what ever allocator numpy used to allocate the array? Thanks Jeremy Jeremy Lewi Engineering Scientist The Intellisis Corporation jl...@inte

[Numpy-discussion] Assigning an array to the field of a structure doesn't work

2009-09-24 Thread Jeremy Lewi
Hi I'm trying to understand the following code: import numpy as np dt=np.dtype([("c",np.int32,(2))]) data=np.ndarray([2],dtype=dt) x=np.array([0,10]) #the following line doesn't set data[0]["c"] = x #only data[0]["c"][0] changes data[0