

def __update_sufficient_statistics(self, resource, args):
    n = resource.get('n')
    S = resource.get_list('S')
    running_wins_vec = numpy.zeros(n).tolist()
    num_pulls_vec = numpy.zeros(n).tolist()
    for q in S:
        index_winner = q[0]
        running_wins_vec[index_winner] += 1
        for idx in q:
            num_pulls_vec[idx] += 1
    total_pulls = len(S)
    resource.set('running_wins_vec', running_wins_vec)
    S.set('num_pulls_vec', num_pulls_vec)
    resource.set('total_pulls', total_pulls)

dataset/ETHPy150Open nextml/NEXT/next/apps/TupleBanditsPureExploration/algs/RandomSampling/RandomSampling.py RandomSampling.__update_sufficient_statistics/VarMisuse@111/162 `resource`->`S`