title: Unable to convert function return value to a Python type
body: <p>I want to bind a c++ function to python using pybind11.
  The c++ function returns:</p>
  <pre><code>auto tree_fusion_depth_map(const hg::tree &amp; tree_1, const hg::tree &amp; tree_2, const hg::tree &amp; tree_3) {
     //some code here
     return xt::eval(xt::view(depth, xt::range(0, nleaves)));
  </code></pre>
  <p>When I call the function in python I get:</p>
  <pre><code>TypeError: Unable to convert function return value to a Python type! The signature was
      (arg0: higra.higram.Tree, arg1: higra.higram.Tree, arg2: higra.higram.Tree) -&gt; xt::xtensor_container&lt;xt::uvector&lt;long, xsimd::aligned_allocator&lt;long, 16ul&gt; &gt;, 1ul, (xt::layout_type)1, xt::xtensor_expression_tag&gt;
  
  </code></pre>
  <p>This is the python module and docstrings in c++ code:</p>
  <pre><code>        PYBIND11_MODULE(mbfusion, m)
          {
              xt::import_numpy();
  
              m.doc() = R&quot;pbdoc(
                  An example higra extension
              )pbdoc&quot;;
  
              m.def(&quot;function&quot;, function, &quot;An example function.&quot;);
  
          }
  </code></pre>
  <p>How can I solve this issue?</p>