<commit_before>import unittest

from cupy import testing


@testing.gpu
class TestInsert(unittest.TestCase):

    _multiprocess_can_split_ = True

    @testing.for_all_dtypes()
    @testing.numpy_cupy_array_equal()
    def test_fill_diagonal_shape1(self, xp, dtype):
        a = testing.shaped_arange((3, 3), xp, dtype)
        xp.fill_diag(a, val=0)
        return a

    @testing.for_all_dtypes()
    @testing.numpy_cupy_array_equal()
    def test_fill_diagonal_shape2(self, xp, dtype):
        a = testing.shaped_arange((2, 2, 2), xp, dtype)
        xp.fill_diag(a, val=1)
        return a

    @testing.for_all_dtypes()
    @testing.numpy_cupy_array_equal()
    def test_fill_diagonal_wrap1(self, xp, dtype):
        a = testing.shaped_arange((3, 5), xp, dtype)
        xp.fill_diag(a, val=0, wrap=True)
        return a

    @testing.for_all_dtypes()
    @testing.numpy_cupy_array_equal()
    def test_fill_diagonal_wrap2(self, xp, dtype):
        a = testing.shaped_arange((5, 3), xp, dtype)
        xp.fill_diag(a, val=0, wrap=True)
        return a<commit_msg>Fix typo<commit_after>import unittest

from cupy import testing


@testing.gpu
class TestInsert(unittest.TestCase):

    _multiprocess_can_split_ = True

    @testing.for_all_dtypes()
    @testing.numpy_cupy_array_equal()
    def test_fill_diagonal_shape1(self, xp, dtype):
        a = testing.shaped_arange((3, 3), xp, dtype)
        xp.fill_diagonal(a, val=0)
        return a

    @testing.for_all_dtypes()
    @testing.numpy_cupy_array_equal()
    def test_fill_diagonal_shape2(self, xp, dtype):
        a = testing.shaped_arange((2, 2, 2), xp, dtype)
        xp.fill_diagonal(a, val=1)
        return a

    @testing.for_all_dtypes()
    @testing.numpy_cupy_array_equal()
    def test_fill_diagonal_wrap1(self, xp, dtype):
        a = testing.shaped_arange((3, 5), xp, dtype)
        xp.fill_diagonal(a, val=0, wrap=True)
        return a

    @testing.for_all_dtypes()
    @testing.numpy_cupy_array_equal()
    def test_fill_diagonal_wrap2(self, xp, dtype):
        a = testing.shaped_arange((5, 3), xp, dtype)
        xp.fill_diagonal(a, val=0, wrap=True)
        return a
{'fraction_non_alphanumeric': 0.11457848160223567, 'fraction_numerical': 0.015836050302748022, 'mean_word_length': 3.2450592885375493, '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': '4618621', 'n_tokens_mistral': 831, 'n_tokens_neox': 788, 'n_words': 148}