code: def fast_median(a):
      
      a = checkma(a)
      #return scoreatpercentile(a.compressed(), 50)
      if a.count() > 0:
          out = np.percentile(a.compressed(), 50)
      else:
          out = np.ma.masked
      return out
docs: Fast median operation for masked array using 50th-percentile