<commit_before>import sys

import numpy as np
from numpy.testing import *
import numpy.core.umath_tests as umt

class TestUfunc(TestCase):
    def test_pickle(self):
        import pickle
        assert pickle.loads(pickle.dumps(np.sin)) is np.sin

    def test_pickle_withstring(self):
        import pickle
        astring = "cnumpy.core\n_ufunc_reconstruct\np0\n(S'numpy.core.umath'\np1\nS'cos'\np2\ntp3\nRp4\n."
        assert pickle.loads(astring) is np.cos
<commit_msg>Use asbytes for Python 3 compatibility.<commit_after>import sys

import numpy as np
from numpy.testing import *
import numpy.core.umath_tests as umt
from numpy.compat import asbytes

class TestUfunc(TestCase):
    def test_pickle(self):
        import pickle
        assert pickle.loads(pickle.dumps(np.sin)) is np.sin

    def test_pickle_withstring(self):
        import pickle
        astring = asbytes("cnumpy.core\n_ufunc_reconstruct\np0\n(S'numpy.core.umath'\np1\nS'cos'\np2\ntp3\nRp4\n.")
        assert pickle.loads(astring) is np.cos

{'fraction_non_alphanumeric': 0.10019646365422397, 'fraction_numerical': 0.010805500982318271, 'mean_word_length': 3.469298245614035, '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': '4894328', 'n_tokens_mistral': 364, 'n_tokens_neox': 364, 'n_words': 75}