Re: [Numpy-discussion] SWIG Numpy and C++ extensions

2012-07-31 Thread David Froger
> >> 1- How do use "apply" for class functions %apply (bla) myobject::foo ? > >%apply is specified on function/method arguments names and types > > only, > >never on function names. So if for example you use: > >%apply (int* ARGOUT_ARRAY1, int DIM1) {(int* rangevec, int n)} > >it will app

Re: [Numpy-discussion] SWIG Numpy and C++ extensions

2012-07-31 Thread Doutriaux, Charles
Thanks David, The clarification on apply is actually a important one! C. On 7/31/12 1:04 PM, "David Froger" wrote: >Hi, > >> I'm looking at SWIG/numpy tutorials >They are these tutorials: >http://docs.scipy.org/doc/numpy/reference/swig.interface-file.html >http://www.scipy.org/Cookbook/SWIG_Nu

Re: [Numpy-discussion] SWIG Numpy and C++ extensions

2012-07-31 Thread David Froger
> > I'm looking at SWIG/numpy tutorials > They are these tutorials: > http://docs.scipy.org/doc/numpy/reference/swig.interface-file.html > http://www.scipy.org/Cookbook/SWIG_NumPy_examples Sorry, I've read "look for"... ___ NumPy-Discussion mailing list N

Re: [Numpy-discussion] SWIG Numpy and C++ extensions

2012-07-31 Thread David Froger
Hi, > I'm looking at SWIG/numpy tutorials They are these tutorials: http://docs.scipy.org/doc/numpy/reference/swig.interface-file.html http://www.scipy.org/Cookbook/SWIG_NumPy_examples Reading numpy.i is also very instructive. > 1- How do use "apply" for class functions %apply (bla) myobject::fo

[Numpy-discussion] SWIG Numpy and C++ extensions

2012-07-30 Thread Doutriaux, Charles
Hi, I have wrapped a c++ code with SWIG. Now that code used to read input from ASCII files. I'm trying to replace that part with an input coming from numpy. I would rather not use setup.py if I have to (but if I can't avoid fine) I'm looking at SWIG/numpy tutorials looks like you need to do s