title: Get minimum value of masked array
body: <p>I have a masked array, from which I'd like to return the <strong>index</strong> of the <strong>minimum value</strong>.  Further, I'd like to return the index of a randomly chosen minimum if there are multiple.  In the example below, this should randomly return 
  index <code>4</code> or <code>5</code>:</p>
  
  <pre><code>import numpy as np
  import numpy.ma as ma
  import random
  
  my_mask = [1, 0, 0, 1, 0, 0]
  my_array = [ 0.018, 0.011, 0.004, 0.003, 0.0, 0.0]
  masked_array = ma.masked_array(my_array,my_mask)
  
  min_indices = np.where(masked_array.min() == masked_array)
  min_index = np.random.choice(min_indices[0])
  
  print masked_array
  print min_index    
  </code></pre>
  
  <p><strong>My problem</strong>: The masked elements are treated as zero (?), and any element from  <code>{0,3,4,5}</code> can be returned.</p>
  
  <p><strong>My question</strong>: What is a good way to return the index of a (randomly chosen) minimum from an array (excluding masked values)?</p>