Returns count of values larger than `multiplier` * `mad`
        :type series:
        :param multiplier:
        :return (array):
548235
def _get_median_absolute_deviation(self, series, multiplier=3):
        
        capped_series = np.minimum(
            series, series.median() + multiplier * series.mad())
        count = pd.value_counts(series != capped_series)
        count = count[True] if True in count else 0
        perc = self._percent(count / self.length)
        return count, perc
1372253
def within_n_mads(n, series):
    """"""
    mad_score = (series - series.mean()) / series.mad()
    return (mad_score.abs() <= n).all()
538095
def has_duplicate_min(x):
    
    if not isinstance(x, (np.ndarray, pd.Series)):
        x = np.asarray(x)
    return np.sum(x == np.min(x)) >= 2
689728
def mean(values: Sequence[Union[int, float, None]]) -> Optional[float]:
    
    total = 0.0  # starting with "0.0" causes automatic conversion to float
    n = 0
    for x in values:
        if x is not None:
            total += x
            n += 1
    return total / n if n > 0 else None
1340340
def count_below_mean(x):
    
    m = np.mean(x)
    return np.where(x < m)[0].size
290665
def count_series(y_true, y_score, countna=False):
    
    y_true, y_score = to_float(y_true, y_score)
    top = _argsort(y_score)

    if not countna:
        a = (~np.isnan(y_true[top])).cumsum()
    else:
        a = range(1, len(y_true)+1)

    return pd.Series(a, index=range(1, len(a)+1))
194388
function multiplier(x) {
    var parts = x.toString().split('.');
    if (parts.length < 2) {
      return 1;
    }
    return Math.pow(10, parts[1].length);
  }
71961
def mad_fltr(dem, n=3):
    
    mad, med = malib.mad(dem, return_med=True)
    print('Excluding values outside of range: {1:0.3f} +/- {0}*{2:0.3f}'.format(n, med, mad))
    rangelim = (med - n*mad, med + n*mad)
    out = range_fltr(dem, rangelim)
    return out
120174
def _multiply(self, f1, f2, out):
        
        # Avoid infinite recursions by making a copy of the functions
        f1_copy = f1.copy()
        f2_copy = f2.copy()

        def product_oop(x, **kwargs):
            """Product out-of-place evaluation function."""
            return np.asarray(f1_copy(x, **kwargs) * f2_copy(x, **kwargs),
                              dtype=self.scalar_out_dtype)

        out._call_out_of_place = product_oop
        decorator = preload_first_arg(out, 'in-place')
        out._call_in_place = decorator(_default_in_place)
        out._call_has_out = out._call_out_optional = False
        return out
488753
def support_false_negative_count(m, m_hat):
    
    m_nnz, m_hat_nnz, intersection_nnz = _nonzero_intersection(m, m_hat)
    return int((m_nnz - intersection_nnz) / 2.0)
46476
def count(self):
        
        return self.mapPartitions(lambda i: [sum(1 for _ in i)]).reduce(operator.add)
815068
def sum(self, values):
        
        values = sorted(values)
        try:
            return (values[-1] - values[0]).total_seconds()
        except IndexError, TypeError:
            return 0
675340
def parallel_multiplier(items):
    
    machines = []
    for data in (xs[0] for xs in items):
        machines.append(max(1, len(get_svcallers(data)), len(dd.get_algorithm_qc(data))))
    return sum(machines)
626391
def NumRegressors(npix, pld_order, cross_terms=True):
    '''
    

    '''

    res = 0
    for k in range(1, pld_order + 1):
        if cross_terms:
            res += comb(npix + k - 1, k)
        else:
            res += npix
    return int(res)
330087
def multiply(multiplicand: list, multiplier: list) -> list:
    
    multiplicand_row, multiplicand_col = len(
        multiplicand), len(multiplicand[0])
    multiplier_row, multiplier_col = len(multiplier), len(multiplier[0])
    if(multiplicand_col != multiplier_row):
        raise Exception(
            "Multiplicand matrix not compatible with Multiplier matrix.")
    # create a result matrix
    result = [[0] * multiplier_col for i in range(multiplicand_row)]
    for i in range(multiplicand_row):
        for j in range(multiplier_col):
            for k in range(len(multiplier)):
                result[i][j] += multiplicand[i][k] * multiplier[k][j]
    return result
111447
def mean(self, **kwargs):
        
        if self._is_transposed:
            kwargs["axis"] = kwargs.get("axis", 0) ^ 1
            return self.transpose().mean(**kwargs)
        # Pandas default is 0 (though not mentioned in docs)
        axis = kwargs.get("axis", 0)
        sums = self.sum(**kwargs)
        counts = self.count(axis=axis, numeric_only=kwargs.get("numeric_only", None))
        if sums._is_transposed and counts._is_transposed:
            sums = sums.transpose()
            counts = counts.transpose()
        result = sums.binary_op("truediv", counts, axis=axis)
        return result.transpose() if axis == 0 else result
1052791
def count(self):
        
        ids, _, ngroups = self.grouper.group_info
        val = self.obj.get_values()

        mask = (ids != -1) & ~isna(val)
        ids = ensure_platform_int(ids)
        minlength = ngroups or 0
        out = np.bincount(ids[mask], minlength=minlength)

        return Series(out,
                      index=self.grouper.result_index,
                      name=self._selection_name,
                      dtype='int64')