title: How to convert from `float` to boost::python::extract<float>
body: <p>I am trying to write a makefile and produce a <code>.so</code> file to use a <code>C++</code> function in <code>Python</code> code. The <code>C++</code> function returns a <code>float</code> value, I do not know how should I write it using <code>boost::python</code>. Here is what I have:</p>
  
  <pre><code>    #include "sift_tracker.hpp"
      sift_tracker g_tracker;
      boost::python::extract&lt;float&gt; get_score() {
            return g_tracker.get_score();
      }
  </code></pre>
  
  <p><code>get_score()</code> is a function written in <code>C++</code> that returns a <code>float</code> value. When I run this code, I am getting this error:
  <code>could not convert from ‘float’ to ‘boost::python::extract&lt;float&gt;</code></p>
  
  <p>I know that floating numbers in <code>python</code> are <code>64 bits</code> and in <code>C++</code>, they are <code>32 bits</code>. But I am not sure if this the reason for getting this error. Any suggestion?</p>