title: Convert numpy array type and values from Float64 to Float32
body: <p>I am trying to convert threshold array(pickle file of isolation forest from scikit learn) of type from Float64 to Float32 </p>
  
  <pre><code>for i in range(len(tree.tree_.threshold)):
      tree.tree_.threshold[i] = tree.tree_.threshold[i].astype(np.float32)
  </code></pre>
  
  <p>​
  Then Printing it</p>
  
  <pre><code>for value in tree.tree_.threshold[:5]:
      print(type(value))
      print(value)
  </code></pre>
  
  <p>the output i am getting is :</p>
  
  <pre><code>&lt;class 'numpy.float64'&gt;
  526226.0
  &lt;class 'numpy.float64'&gt;
  91.9514312744
  &lt;class 'numpy.float64'&gt;
  3.60330319405
  &lt;class 'numpy.float64'&gt;
  -2.0
  &lt;class 'numpy.float64'&gt;
  -2.0
  </code></pre>
  
  <p>I am not getting a proper conversion to Float32. I want to convert values and their type to Float32, Did anybody have any workaround this ?</p>