
    J/Ph                         d dl Z d dlZd dlmZ d dlmZ  G d de j                  Z G d de j                  Z	e
dk    r e j                     dS dS )	    N)jit)override_configc                       e Zd Zd Zd ZdS )TestJITMethodc                     G d dt                     } |d          }t          j                            |                    d          t          j        g dt          j                             |j        j                                        \  }|j	        d         }|j                                        \  }| 
                    |j        j                   d S )Nc                   >    e Zd Zd Z ed          d             ZdS )ETestJITMethod.test_bound_jit_method_with_loop_lift.<locals>.Somethingc                     || _         d S Nx0selfr   s     Z/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numba/tests/test_jitmethod.py__init__zNTestJITMethod.test_bound_jit_method_with_loop_lift.<locals>.Something.__init__           Tforceobjc                     t          j        dt           j                  }| j        }t	          |j        d                   D ]
}||z  ||<   |S )N   )shapedtyper   )npemptyfloat32r   ranger   )r   xar   is        r   methodzLTestJITMethod.test_bound_jit_method_with_loop_lift.<locals>.Something.method   sP    H1BJ777Wqwqz** " "A6AaDDr   N__name__
__module____qualname__r   r   r!    r   r   	Somethingr	      sL           S$     r   r'      r   )   r)   r)   r)   r)   )r   r   )objectr   testingassert_array_equalr!   arrayr   	overloadsvalueslifted
assertTruefndescnative)r   r'   	somethingcresjitlooploopcress         r   $test_bound_jit_method_with_loop_liftz2TestJITMethod.test_bound_jit_method_with_loop_lift
   s    	 	 	 	 	 	 	 	 IaLL	

%%i&6&6q&9&9H)))<<<	> 	> 	> !+2244+a.&--//
./////r   c                      G d dt                     } |d          }|                     |                    |          d           d S )Nc                   >    e Zd Zd Z ed          d             ZdS )8TestJITMethod.test_unbound_jit_method.<locals>.Somethingc                     || _         d S r   r   r   s     r   r   zATestJITMethod.test_unbound_jit_method.<locals>.Something.__init__%   r   r   Tr   c                     | j         S r   r   )r   s    r   r!   z?TestJITMethod.test_unbound_jit_method.<locals>.Something.method(   s	    wr   Nr"   r&   r   r   r'   r;   $   sL           S$     r   r'   r(   )r*   assertEqualr!   )r   r'   r4   s      r   test_unbound_jit_methodz%TestJITMethod.test_unbound_jit_method#   se    	 	 	 	 	 	 	 	 IaLL	)))44a88888r   N)r#   r$   r%   r8   r?   r&   r   r   r   r   	   s2        0 0 02
9 
9 
9 
9 
9r   r   c                       e Zd Zd Zd ZdS )TestDisabledJITc                 "   t          dd          5  d }t          |          }d d d            n# 1 swxY w Y   |                     ||           |                     d |d                     |                     d |d                     d S )NDISABLE_JITTc                     | S r   r&   r   s    r   r!   z7TestDisabledJIT.test_decorated_function.<locals>.method3       r   
   r   r   r>   r   r!   jitteds      r   test_decorated_functionz'TestDisabledJIT.test_decorated_function1   s    ]D11 	! 	!  [[F	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	!
 	(((VVBZZ(((VVBZZ(((((s   044c                 6   t          dd          5  d } t          d          |          }d d d            n# 1 swxY w Y   |                     ||           |                     d |d                     |                     d |d                     d S )NrC   Tc                     | S r   r&   rE   s    r   r!   zCTestDisabledJIT.test_decorated_function_with_kwargs.<locals>.method=   rF   r   )nopythonrG   rH   rI   s      r   #test_decorated_function_with_kwargsz3TestDisabledJIT.test_decorated_function_with_kwargs;   s    ]D11 	0 	0  'S$'''//F	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0
 	(((VVBZZ(((VVBZZ(((((s   :>>N)r#   r$   r%   rK   rO   r&   r   r   rA   rA   0   s2        ) ) )) ) ) ) )r   rA   __main__)unittestnumpyr   numbar   numba.tests.supportr   TestCaser   rA   r#   mainr&   r   r   <module>rW      s               / / / / / /$9 $9 $9 $9 $9H% $9 $9 $9N) ) ) ) )h' ) ) )* zHMOOOOO r   