Re: [Numpy-discussion] Creating PyArrayObject in C++

2009-07-08 Thread Kenny Abernathy
Thanks, you two. That helps alot. The PyCObject_FromVoidPtr() trick is good to know--I still have to have my class because it holds other data, but this definitely points me in the right direction. On Tue, Jul 7, 2009 at 9:55 PM, Lisandro Dalcin wrote: > 2009/7/7 Stéfan van der Walt : > > Hi K

Re: [Numpy-discussion] Creating PyArrayObject in C++

2009-07-07 Thread Lisandro Dalcin
2009/7/7 Stéfan van der Walt : > Hi Kenny > > 2009/7/7 Kenny Abernathy : >> I can guarantee that all analysis will be finished before the Unit object is >> destroyed and delete[] is called, so I don't think that's a problem. > > There is a neat trick to make sure things don't get deallocated out of

Re: [Numpy-discussion] Creating PyArrayObject in C++

2009-07-07 Thread Stéfan van der Walt
Hi Kenny 2009/7/7 Kenny Abernathy : > I can guarantee that all analysis will be finished before the Unit object is > destroyed and delete[] is called, so I don't think that's a problem. There is a neat trick to make sure things don't get deallocated out of order: http://blog.enthought.com/?p=62

[Numpy-discussion] Creating PyArrayObject in C++

2009-07-07 Thread Kenny Abernathy
I've built an analysis framework for studying electrophysiogical data, and I'd like to add NumPy (and SciPy, although that's not germane to my current question) as an engine so users can more easily add their own functions to the program. I'm at the point now of trying to share the data between th