Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-12 Thread Ravi
On Tuesday 11 November 2008 04:19:26 am Rolf Wester wrote: I'm not sure whether TNT is still actively maintained, the TNT home page was last modified in 2004, so you are probably right. But the TNT Arrays are just what I need and I know of no alternative. Use boost.python + boost.ublas +

[Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Rolf Wester
Hi all, I would like to wrap some C++ classes that use TNT-Arrays. Is it possible to pass numpy arrays to C++ functions that expect TNT-Arrays as function parameter? Does anybody know how the wrappers could be generated using swig? I would be very appreciative for any help. With kind regards

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Charles R Harris
On Tue, Nov 11, 2008 at 1:24 AM, Rolf Wester [EMAIL PROTECTED]wrote: Hi all, I would like to wrap some C++ classes that use TNT-Arrays. Is it possible to pass numpy arrays to C++ functions that expect TNT-Arrays as function parameter? Does anybody know how the wrappers could be generated

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Rolf Wester
Charles R Harris wrote: On Tue, Nov 11, 2008 at 1:24 AM, Rolf Wester [EMAIL PROTECTED]wrote: Hi all, I would like to wrap some C++ classes that use TNT-Arrays. Is it possible to pass numpy arrays to C++ functions that expect TNT-Arrays as function parameter? Does anybody know how the

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Charles R Harris
On Tue, Nov 11, 2008 at 2:19 AM, Rolf Wester [EMAIL PROTECTED]wrote: Charles R Harris wrote: On Tue, Nov 11, 2008 at 1:24 AM, Rolf Wester [EMAIL PROTECTED]wrote: Hi all, I would like to wrap some C++ classes that use TNT-Arrays. Is it possible to pass numpy arrays to C++ functions

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Rolf Wester
Charles R Harris wrote: On Tue, Nov 11, 2008 at 2:19 AM, Rolf Wester [EMAIL PROTECTED]wrote: Charles R Harris wrote: On Tue, Nov 11, 2008 at 1:24 AM, Rolf Wester [EMAIL PROTECTED]wrote: Hi all, I would like to wrap some C++ classes that use TNT-Arrays. Is it possible to pass numpy

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Matthieu Brucher
Hi, Yes, you can, but it can be tricky. What you may need to do is to check if TNT is capable of accepting an array by pointer without handling the memory (delete when the array is destroyed). If there are tools to do this, then it will be easy. If not, you will have to add a specific handler

Re: [Numpy-discussion] numpy, swig and TNT-Arrays

2008-11-11 Thread Hoyt Koepke
Hi Rolf, Just curious -- have you considered using the blitz++ library (http://www.oonumerics.org/blitz/)? There seems to be a lot of overlap in terms of functionality. If you use blitz++, it's largely included in scipy as part of weave. Additionally, I already have code that generates