<commit_before>import numpy as np
from numba import from_dtype, cuda
from numba import unittest_support as unittest


class TestAlignment(unittest.TestCase):
    def test_record_alignment(self):
        rec_dtype = np.dtype([('a', 'int32'), ('b', 'float64')], align=True)
        rec = from_dtype(rec_dtype)

        @cuda.jit((rec[:],))
        def foo(a):
            i = cuda.grid(1)
            a[i].a = a[i].b

        a_recarray = np.recarray(3, dtype=rec)<commit_msg>Use Numpy dtype when creating Numpy array<commit_after>import numpy as np
from numba import from_dtype, cuda
from numba import unittest_support as unittest


class TestAlignment(unittest.TestCase):
    def test_record_alignment(self):
        rec_dtype = np.dtype([('a', 'int32'), ('b', 'float64')], align=True)
        rec = from_dtype(rec_dtype)

        @cuda.jit((rec[:],))
        def foo(a):
            i = cuda.grid(1)
            a[i].a = a[i].b

        a_recarray = np.recarray(3, dtype=rec_dtype)
{'fraction_non_alphanumeric': 0.1364562118126273, 'fraction_numerical': 0.012219959266802444, 'mean_word_length': 2.979757085020243, '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': '4320369', 'n_tokens_mistral': 343, 'n_tokens_neox': 340, 'n_words': 79}