title: Convert numpy array of float32 data type to hex format
body: <p>I want to convert a numpy array, which is of float32 data type to its equivalent hexadecimal format, in Python 3.</p>
  
  <p>This is the implementation I tried but it doesn't seem to work:</p>
  
  <pre><code>import numpy as np
  np.set_printoptions(formatter={'float':hex})
  np.array([1.2,3.4,2.6,2.1], dtype = np.float32)
  
  </code></pre>