title: what is the fastest way to get the mode of a numpy array
body: <p>I have to find the mode of a NumPy array that I read from an hdf5 file.  The NumPy array is 1d and contains floating point values. </p>
  
  <pre><code>my_array=f1[ds_name].value    
  mod_value=scipy.stats.mode(my_array)
  </code></pre>
  
  <p>My array is 1d and contains around 1M values. It takes about 15 min for my script to return the mode value. Is there any way to make this faster?</p>
  
  <p>Another question is why <code>scipy.stats.median(my_array)</code> does not work while mode works?</p>
  
  <blockquote>
    <p><strong>AttributeError: module 'scipy.stats' has no attribute 'median'</strong></p>
  </blockquote>