title: Segmentation fault when using boost::numpy::ndarray
body: <p>I am getting what I think is a strange seg fault when I am trying to pass <code>boost::numpy::ndarray</code> as an argument:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/python.hpp&gt;
  #include &lt;boost/numpy.hpp&gt;
  
  
  void say_hello(boost::numpy::ndarray&amp; my_array)
  //void say_hello(int x) This works fine
  {
    std::cout&lt;&lt;"Hello"&lt;&lt;std::endl;
  }
  
  BOOST_PYTHON_MODULE(hello_ext)
  {
      using namespace boost::python;
      def("say_hello", say_hello);
  
  }
  </code></pre>
  
  <p>I know the example is silly, but I should not be getting a seg fault there, and this is the smallest example I was able to reduce the problem to. Maybe I need to specify the <code>ndarray</code> type or number of dimensions, but I could not find any documentation on it. I was looking at <a href="http://docs.ros.org/hydro/api/boost_numpy/html/namespaceboost_1_1numpy.html" rel="noreferrer">this</a>, but it didn't seem very helpful. My gut feeling is I am missing something simple, but I just don't see it.</p>
  
  <p>When I run this:</p>
  
  <pre><code>In [1]: from hello_ext import *
  
  In [2]: import numpy as np
  
  In [3]: say_hello(np.array([3,4,5]))
  Segmentation fault (core dumped)
  </code></pre>
  
  <p>My Makefile:</p>
  
  <pre><code>PYTHON_VERSION = 2.7
  PYTHON_INCLUDE = /usr/include/python$(PYTHON_VERSION)
  
  
  BOOST_INC = /usr/include
  BOOST_LIB = /usr/lib
  
  TARGET = hello_ext
  
  $(TARGET).so: $(TARGET).o
      g++ -std=c++11 -shared -Wl,--export-dynamic $(TARGET).o -L$(BOOST_LIB) -lboost_python -lboost_numpy -L/usr/lib/python$(PYTHON_VERSION)/config -lpython$(PYTHON_VERSION) -o $(TARGET).so
  
  $(TARGET).o: $(TARGET).cpp
      g++ -std=c++11 -I$(PYTHON_INCLUDE) -I$(BOOST_INC) -fPIC -c $(TARGET).cp
  </code></pre>