title: SWIG: No typemaps are defined
body: <p>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 which takes an array as input.</p>
  
  <p>Here's the header file, </p>
  
  <pre><code>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();
      };
  </code></pre>
  
  <p>and here's the swig interface file,</p>
  
  <pre><code>%module twowave
  %{
    #define SWIG_FILE_WITH_INIT
    #include &lt;twowave.h&gt;
  %}
  
  %include "numpy.i"
  %init %{
  import_array();
  %}
  
  %apply (double IN_ARRAY1[3]) {(double H_[3])};
  
  %include &lt;twowave.h&gt;
  </code></pre>
  
  <p>The problem is that for the array input, SWIG complains that there is no typemap. I don't understand why. The numpy.i file was taken from <a href="https://raw.github.com/numpy/numpy/master/doc/swig/numpy.i" rel="nofollow">here</a> and the typemap I am using is described <a href="http://docs.scipy.org/doc/numpy-dev/reference/swig.interface-file.html" rel="nofollow">here</a></p>
  
  <p>Any help would be appreciated.</p>