title: Getting buffer of data into C++ with boost::python
body: <p>I'd like to be able to pass a buffer (ie something implementing the buffer protocol, such as a numpy array) of numeric data into c++ from Python:</p>
  
  <pre><code>&gt;&gt;&gt; import mymod
  &gt;&gt;&gt; import numpy
  &gt;&gt;&gt; mymod.some_func(numpy.array([1,2,3]))
  </code></pre>
  
  <p>and receive it in c++ in some way:</p>
  
  <pre><code>void some_func([something] array) {
      for (int ii : array) {
         cout &lt;&lt; ii &lt;&lt; endl;
      }
  }
  </code></pre>
  
  <p>prints</p>
  
  <pre><code>1 
  2
  3
  </code></pre>
  
  <p>I don't really care what the [something] is (pointer, std::vector, whatever).  Does anyone know how to do this?  There's surprisingly little information on it...</p>