<commit_before>import functools
import operator
import warnings

import numpy as np
import scipy.misc as spm


def prod(collection):
    """Product of all elements in the collection"""
    return functools.reduce(operator.mul, collection)


def game_size(players, strategies, exact=False):
    """Number of profiles in a symmetric game with players and strategies"""
    if exact:
        return spm.comb(players+strategies-1, players, exact=True)
    else:
        sizes = spm.comb(players+strategies-1, players,
                         exact=False).astype(int)
        assert np.all(sizes >= 0), "Overflow on game size"
        return sizes


def only(iterable):
    """Return the only element of an iterable

    Throws a value error if the iterable doesn't contain only one element
    """
    try:
        it = iter(iterable)
        value = next(it)
        try:
            next(it)<commit_msg>Fix bug in game size for large games<commit_after>import functools
import operator
import warnings

import numpy as np
import scipy.misc as spm


def prod(collection):
    """Product of all elements in the collection"""
    return functools.reduce(operator.mul, collection)


def game_size(players, strategies, exact=False):
    """Number of profiles in a symmetric game with players and strategies"""
    if exact:
        return spm.comb(players+strategies-1, players, exact=True)
    else:
        sizes = np.rint(spm.comb(players+strategies-1, players,
                                 exact=False)).astype(int)
        assert np.all(sizes >= 0), "Overflow on game size"
        return sizes


def only(iterable):
    """Return the only element of an iterable

    Throws a value error if the iterable doesn't contain only one element
    """
    try:
        it = iter(iterable)
        value = next(it)
        try:
            next(it)
{'fraction_non_alphanumeric': 0.08839479392624729, 'fraction_numerical': 0.0032537960954446853, 'mean_word_length': 2.727272727272727, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7209501', 'n_tokens_mistral': 535, 'n_tokens_neox': 520, 'n_words': 184}