Return the mean on the <nb> values in the history.
491174
def history_mean(self, nb=5):
        
        _, v = zip(*self._history)
        return sum(v[-nb:]) / float(v[-1] - v[-nb])
476169
def eval_mean(self, func, args=()):
        """"""
        self.fmean = func(self.mean, *args)
        return self.fmean
1341965
def mean(self, series, start, limit):
        '''
        
        '''
        return float(np.mean(series[start:limit]))
960571
def mean(self):
        
        mean_point_data = np.mean(self._data, axis=1)
        return Point(mean_point_data, self._frame)
1272959
def Mean(a, axis, keep_dims):
    
    return np.mean(a, axis=axis if not isinstance(axis, np.ndarray) else tuple(axis),
                   keepdims=keep_dims),
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
852556
def mean(self, axis=0, *args, **kwargs):
        
        nv.validate_mean(args, kwargs)
        valid_vals = self._valid_sp_values
        sp_sum = valid_vals.sum()
        ct = len(valid_vals)

        if self._null_fill_value:
            return sp_sum / ct
        else:
            nsparse = self.sp_index.ngaps
            return (sp_sum + self.fill_value * nsparse) / (ct + nsparse)
1072390
def mean(self, only_valid=True) -> ErrorValue:
        """"""
        if not only_valid:
            intensity = self.intensity
            error = self.error
        else:
            intensity = self.intensity[self.mask]
            error = self.error[self.mask]
        return ErrorValue(intensity.mean(),
                          (error ** 2).mean() ** 0.5)
133081
def get_mean(self, col, row):
        
        return javabridge.call(self.jobject, "getMean", "(II)D", col, row)
37077
def mean(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs):
        
        axis = self._get_axis_number(axis) if axis is not None else 0
        data = self._validate_dtypes_sum_prod_mean(
            axis, numeric_only, ignore_axis=False
        )
        return data._reduce_dimension(
            data._query_compiler.mean(
                axis=axis,
                skipna=skipna,
                level=level,
                numeric_only=numeric_only,
                **kwargs
            )
        )
622652
public byte meanValue() {
        if (data.length == 0)
            return 0;

        int sum = 0;
        for (byte b : data)
            sum += b;
        return (byte) (sum / data.length);
    }
549469
def mean(self):
        
        return self._constructor(self.values.mean(axis=self.baseaxes, keepdims=True))
1231844
def mean(series):
    

    if np.issubdtype(series.dtype, np.number):
        return series.mean()
    else:
        return np.nan
22384
def scatter_nb(self,xdata,ydata=[],trendline=False):
        ''''''
        self.scatter(xdata,ydata,trendline)
986642
def get_history(self):
        """"""
        self.load_history()
        return map(lambda x: (x, self.history[x]), self.ordered_history)
374914
def mean(self):
        
        if self._can_use_new_school():
            self._prep_spark_sql_groupby()
            import pyspark.sql.functions as func
            return self._use_aggregation(func.mean)
        self._prep_pandas_groupby()
        return DataFrame.fromDataFrameRDD(
            self._regroup_mergedRDD().values().map(
                lambda x: x.mean()), self.sql_ctx)
1312405
def get_stats_history(self, item=None, nb=0):
        """"""
        s = self.get_json_history(nb=nb)

        if item is None:
            return self._json_dumps(s)

        if isinstance(s, dict):
            try:
                return self._json_dumps({item: s[item]})
            except KeyError as e:
                logger.error("Cannot get item history {} ({})".format(item, e))
                return None
        elif isinstance(s, list):
            try:
                # Source:
                # http://stackoverflow.com/questions/4573875/python-get-index-of-dictionary-item-in-list
                return self._json_dumps({item: map(itemgetter(item), s)})
            except (KeyError, ValueError) as e:
                logger.error("Cannot get item history {} ({})".format(item, e))
                return None
        else:
            return None