title: Cython PXD does not seem to be used for PYX file
body: <p>I am trying to learn cython by implementing a linear interpolator from C++ to Python.
  I am trying to use PXD header files for the final Intepolator object so that it can be reused in other methods / classes down the line, so I want to have the PXD header file available.</p>
  
  <p>I have a cpp_linear_interpolation.cpp and cpp_linear_interpolation.h that work fine, the interpolator gets instantiated with two vectors of double (x and y) as input.</p>
  
  <p>There are my files</p>
  
  <p><strong>cy_linear_interpolation.pxd</strong></p>
  
  <pre><code># distutils: language = c++
  
  import cython
  import numpy as np
  cimport numpy as np
  from libcpp.vector cimport vector
  
  cdef extern from "cpp_linear_interpolation.h":
      cdef cppclass cppLinearInterpolation:
          cppLinearInterpolation(vector[double], vector[double]) except +
          vector[double] interp(vector[double]) except +
  
          vector[double] m_x
          vector[double] m_y
          int m_len
          double m_x_min
          double m_x_max
  </code></pre>
  
  <p><strong>py_linear_interpolation.pxd</strong></p>
  
  <pre><code>from cy_linear_interpolation cimport cppLinearInterpolation
  
  cdef class LinearInterpolation:
       cdef cppLinearInterpolation * thisptr
  </code></pre>
  
  <p><strong>py_linear_interpolation.pyx</strong></p>
  
  <pre><code>import cython
  import numpy as np
  cimport numpy as np
  from libcpp.vector cimport vector
  from cy_linear_interpolation cimport cppLinearInterpolation
  
  
  cdef class LinearInterpolation:
      # cdef cppLinearInterpolation *thisptr
  
      def __cinit__(self,vector[double] x,vector[double] y):
          self.thisptr = new cppLinearInterpolation(x, y)
  
      def __dealloc__(self):
          del self.thisptr
  
      def interpolate(self,vector[double] x_new):
          return self.thisptr.interp(x_new)
  </code></pre>
  
  <p><strong>setup.py</strong></p>
  
  <pre><code>from distutils.core import setup
  from distutils.extension import Extension
  from Cython.Distutils import build_ext
  import numpy
  
  
  setup( name = 'Cython_LinInt',
         ext_modules=[Extension("cython_linear_interpolation",
                                sources=["py_linear_interpolation.pyx", "cpp_linear_interpolation.cpp",],
                                language="c++",
                                include_dirs=[numpy.get_include()]) 
         ],
         cmdclass = {'build_ext': build_ext},
  )    
  </code></pre>
  
  <p>compiling with Microsoft (R) C/C++ Optimizing Compiler Version 15.00.30729.01 for x64</p>
  
  <p>I get the error message</p>
  
  <blockquote>
    <p>Cannot convert 'cppLinearInterpolation *' to Python object</p>
  </blockquote>
  
  <p>If I move</p>
  
  <pre><code>cdef cppLinearInterpolation * _thisptr
  </code></pre>
  
  <p>to the pyx file (the commented out line in py_linear_interpolation.pyx), it compiles and run, but then I cannot access the pointer from another cython file.
  Ideally I would be able to instantiate the interpolator from python, and use it as argument for other python / cython functions. 
  I am sure I must be doing something stupid, but I have been blocked on that problem for a little while now and have not found yet the solution...</p>
  
  <p>EDIT: there was a typo in py_linear_interpolation.pyx, now corrected
  EDIT 2: the same type was in py_linear_interpolation.pyd, the member name is thisptr, the code still isn t compiling and I get the same error. It does not seem that the cython compiler recognizes that self.thisptr is not a python object and should be a pointer to a cppLinearInterpolation</p>