code: def reject_outliers(a, threshold=3.5):
      
      if len(a) < 3:
          return np.zeros(len(a), dtype=bool)
  
      A = np.array(a, dtype=float)
      lb, ub = outlier_cutoff(A, threshold=threshold)
      return np.logical_or(A > ub, A < lb)
docs: Iglewicz and Hoaglin's robust test for multiple outliers (two sided test).
      <http://www.itl.nist.gov/div898/handbook/eda/section3/eda35h.htm>
  
      See also:
      <http://contchart.com/outliers.aspx>
  
      >>> a = [0, 1, 2, 4, 12, 58, 188, 189]
      >>> list(reject_outliers(a))
      [False, False, False, False, False, True, True, True]