Compute the stats defined in ``self.cum_stats``.
        
        :returns: collection of all computed :py:class:`.AccumulateStats`
        :rtype: dict
180844
def compute_stats(self):
        
        if not self.__have_stats:
            if self.init_cs_teams and self.cum_stats:
                self.__init_cs_teams()
            
            for play in self._rep_reader.parse_plays_stream():
                p = Play(**play)
                self.__wrapped_plays.append(p)
                if self.cum_stats:
                    self.__process(p, self.cum_stats, 'update')
                self.__have_stats = True
                
        return self.cum_stats
110770
def stats(self, ops=(min, max, np.median, sum)):
        """"""
        names = [op.__name__ for op in ops]
        ops = [_zero_on_type_error(op) for op in ops]
        columns = [[op(column) for op in ops] for column in self.columns]
        table = type(self)().with_columns(zip(self.labels, columns))
        stats = table._unused_label('statistic')
        table[stats] = names
        table.move_to_start(stats)
        return table
1349127
def read_stream_stats(self):
        
        stream_stats = OrderedDict()
        for stream in self.streams.values():
            stream_stats[stream] = stream.read_stats()
        return stream_stats
1322376
def stats(data):
    '''
    '''
    return {'len': len(data),
            'mean': np.mean(data),
            'sum': np.sum(data),
            'std': np.std(data),
            'min': np.min(data),
            'max': np.max(data)}
153734
def read_tpld_stats(self):
        
        payloads_stats = OrderedDict()
        for tpld in self.tplds.values():
            payloads_stats[tpld] = tpld.read_stats()
        return payloads_stats
570863
def statistics(self):
        
        result = {}
        for r in self.results:
            result.setdefault(r.status, 0)
            result[r.status] += 1
        return result
810956
def get_statistics(self):
        
        return {
            'cumulative_elapsed_time': self.get_cumulative_elapsed_time(),
            'percentage': self.get_percentage(),
            'n_splits': self.get_n_splits(),
            'mean_per_split': self.get_mean_per_split(),
        }
1036627
def statistics(self):
        
        if self._statistics is None:
            self._statistics = TaskStatisticsList(
                self._version,
                assistant_sid=self._solution['assistant_sid'],
                task_sid=self._solution['sid'],
            )
        return self._statistics
1341378
def totals(iter, keyfunc, sumfunc):
    
    data = sorted(iter, key=keyfunc)
    res = {}

    for k, group in groupby(data, keyfunc):
        res[k] = sum([sumfunc(entry) for entry in group])

    return res
858986
def stats (self, antnames):
        """"""
        nbyant = np.zeros (self.nants, dtype=np.int)
        sum = np.zeros (self.nants, dtype=np.complex)
        sumsq = np.zeros (self.nants)
        q = np.abs (self.normvis - 1)

        for i in range (self.nsamps):
            i1, i2 = self.blidxs[i]
            nbyant[i1] += 1
            nbyant[i2] += 1
            sum[i1] += q[i]
            sum[i2] += q[i]
            sumsq[i1] += q[i]**2
            sumsq[i2] += q[i]**2

        avg = sum / nbyant
        std = np.sqrt (sumsq / nbyant - avg**2)
        navg = 1. / np.median (avg)
        nstd = 1. / np.median (std)

        for i in range (self.nants):
            print ('  %2d %10s %3d %f %f %f %f' %
                   (i, antnames[i], nbyant[i], avg[i], std[i], avg[i] * navg, std[i] * nstd))
1156871
def stats(self):
        '''
        
        '''
        last_event = list(filter(lambda x: 'event' in x and x['event'] == 'playbook_on_stats',
                                 self.events))
        if not last_event:
            return None
        last_event = last_event[0]['event_data']
        return dict(skipped=last_event['skipped'],
                    ok=last_event['ok'],
                    dark=last_event['dark'],
                    failures=last_event['failures'],
                    processed=last_event['processed'])
568421
def all_stats(self):
        
        schema = AllStatsSchema()
        resp = self.service.post(self.base, params={'stats': 'all'})
        return self.service.decode(schema, resp)
1110623
def get_stats(self, pattern):
        
        if not self.cache:
            return
        key_list = self.cache.get(Conf.Q_STAT)
        if not key_list or len(key_list) == 0:
            return []
        stats = []
        for key in key_list:
            stat = self.cache.get(key)
            if stat:
                stats.append(stat)
            else:
                key_list.remove(key)
        self.cache.set(Conf.Q_STAT, key_list)
        return stats
146250
def stats():
    '''
    
    '''
    ret = {}
    out = __salt__['cmd.run']('quotastats').splitlines()
    for line in out:
        if not line:
            continue
        comps = line.split(': ')
        ret[comps[0]] = comps[1]

    return ret
673800
def compute_stats(array, stats, weights):
    
    result = numpy.zeros((len(stats),) + array.shape[1:], array.dtype)
    for i, func in enumerate(stats):
        result[i] = apply_stat(func, array, weights)
    return result
1062846
def getProcessStats(self):
        
        info_dict = {}
        try:
            fp = open(cpustatFile, 'r')
            data = fp.read()
            fp.close()
        except:
            raise IOError('Failed reading stats from file: %s' % cpustatFile)
        for line in data.splitlines():
            arr = line.split()
            if len(arr) > 1 and arr[0] in ('ctxt', 'intr', 'softirq',
                                           'processes', 'procs_running', 
                                           'procs_blocked'):
                info_dict[arr[0]] = arr[1]
        return info_dict
309957
def read_stats(self):
        

        stats_with_captions = OrderedDict()
        for stat_name in self.stats_captions.keys():
            stats_with_captions[stat_name] = self.read_stat(self.stats_captions[stat_name], stat_name)
        return stats_with_captions