o
    ۾i!                     @   s2   d dl Z G dd de jZedkre   dS dS )    Nc                   @   s   e Zd Zdd Zdd ZdS )TestExamplec                    s`   dd l }ddlm} |jdgddgd}d | fdd	}||d  | ||d d
 d S )Nr   )njit      a1f8a2r	   dtyper   r   c                    s$   d}|d } d }| | | |  S )Nr   r   r    )rec	fields_lcfield_name1field_name2	fields_glr   [/home/ubuntu/.local/lib/python3.10/site-packages/numba/tests/doc_examples/test_rec_array.pyget_field_sum   s   z>TestExample.test_documentation_example1.<locals>.get_field_sum   )numpynumbar   arrayassertEqualselfnpr   arrr   r   r   r   test_documentation_example1   s   z'TestExample.test_documentation_example1c                    sf   dd l }ddlm}m |jdgddgd}d | fdd	}||d  | ||d d
 d S )Nr   )r   literal_unrollr   r   r
   r   r   c                    s"   d} D ]}|| | 7 }q|S )Nr   r   )r   outfr   r"   r   r   r   !   s   z>TestExample.test_documentation_example2.<locals>.get_field_sumr   )r   r   r   r"   r   r   r   r   r%   r   test_documentation_example2   s   z'TestExample.test_documentation_example2N)__name__
__module____qualname__r!   r&   r   r   r   r   r      s    r   __main__)unittestTestCaser   r'   mainr   r   r   r   <module>   s
    )