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

David Froger david.froger at gmail.com
Wed Aug 1 01:30:44 EDT 2012


> >> 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 apply on every functions that have arguments "int* ARGOUT_ARRAY1,
> >int DIM1"

On Tue, 31 Jul 2012 15:28:02 -0700, "Doutriaux, Charles" <doutriaux1 at llnl.gov> wrote:
> Thanks David,
> 
> The clarification on apply is actually a important one!

And as a consequence, if 2 fonctions have the same (type argname), its hard to
apply 2 differents typemaps on it, which can be needed...
This recent discussion about it is interessing:
http://old.nabble.com/Argument-annotations--td34154195.html



More information about the NumPy-Discussion mailing list