I have a C ++ class that I am trying to wrap for Python using SWIG. I am having trouble trying to wrap one of the functions that take an array as input.
Here is the header file
class dyndiff_data_t
{
private:
double H[3];
double GAMMA;
double k;
double P;
public:
dyndiff_data_t(double H_[3],
const double GAMMA_,
const double k_,
const double P_);
void test();
};
and here is the swig interface file,
%module twowave
%{
#define SWIG_FILE_WITH_INIT
#include <twowave.h>
%}
%include "numpy.i"
%init %{
import_array();
%}
%apply (double IN_ARRAY1[3]) {(double H_[3])};
%include <twowave.h>
The problem is that to enter the array, SWIG complains that there is no typical card. I do not understand why. The numpy.i file was taken from here and the map map you describe is described here
Any help would be appreciated.
source
share