<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Mathematical tools for dit.
"""

from __future__ import absolute_import

# Global random number generator
import numpy as np
prng = np.random.RandomState()
# Set the error level to ignore...for example: log2(0).
np.seterr(all='ignore')
del np

from .equal import close, allclose
from .sampling import sample, _sample, _samples
from .ops import get_ops, LinearOperations, LogOperations
from .fraction import approximate_fraction
from .sigmaalgebra import sigma_algebra, is_sigma_algebra, atom_set

from . import aitchison
from . import combinatorics<commit_msg>Make perturb_pmf available in dit.math.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Mathematical tools for dit.
"""

from __future__ import absolute_import

# Global random number generator
import numpy as np
prng = np.random.RandomState()
# Set the error level to ignore...for example: log2(0).
np.seterr(all='ignore')
del np

from .equal import close, allclose
from .sampling import sample, _sample, _samples
from .ops import get_ops, LinearOperations, LogOperations
from .fraction import approximate_fraction
from .sigmaalgebra import sigma_algebra, is_sigma_algebra, atom_set
from .perturb import perturb_pmf

from . import aitchison
from . import combinatorics
{'fraction_non_alphanumeric': 0.09077040427154844, 'fraction_numerical': 0.004576659038901602, 'mean_word_length': 5.018348623853211, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3265028', 'n_tokens_mistral': 396, 'n_tokens_neox': 380, 'n_words': 139}