U
    ,dP                     @   s  d dl Z d dlmZ d dlZd dlZd dlZd dlZd dlZd dlZ	d dl
mZmZmZ d dlmZ d dlmZ d dl Z d dlmZmZmZmZmZ eddZd	d
 Zdd Zdd Zdd Zdd Zdd Zdd Zdd Z dd Z!dd Z"dd Z#dd  Z$d!d" Z%d#d$ Z&d%d& Z'd'd( Z(d)d* Z)d+d, Z*d-d. Z+d/d0 Z,d1d2 Z-d3d4 Z.d5d6 Z/d7d8 Z0d9d: Z1d;d< Z2d=d> Z3d?d@ Z4dAdB Z5dCdD Z6dEdF Z7dGdH Z8dIdJ Z9dKdL Z:dMdN Z;dOdP Z<dQdR Z=dSdT Z>dUdV Z?dWdX Z@dYdZ ZAG d[d\ d\eeZBG d]d^ d^eBZCG d_d` d`eBZDG dadb dbeDZEG dcdd ddeDZFG dedf dfeDZGG dgdh dheBZHG didj djeBZIG dkdl dleBZJeKdmkre L  dS )n    N)
namedtuple)compile_isolatedFlagserrorsjit)types)TestCaseenable_pyobj_flagsMemoryLeakMixintagcompile_functionPointabc                 C   s*   | dd dd |D i } td| t S )NZinitializerz, c                 s   s   | ]}t |V  qd S N)repr).0arg r   9/tmp/pip-unpacked-wheel-eu7e0c37/numba/tests/test_sets.py	<genexpr>   s     z-_build_set_literal_usecase.<locals>.<genexpr>Z	build_set)joinr   globals)codeargsr   r   r   _build_set_literal_usecase   s    r   c                 C   s   d}t || S )Nz@if 1:
    def build_set():
        return {%(initializer)s}
    r   r   r   r   r   r   set_literal_return_usecase   s    r    c                 C   s   d}t || S )Nz^if 1:
    def build_set():
        my_set = {%(initializer)s}
        return list(my_set)
    r   r   r   r   r   set_literal_convert_usecase"   s    r!   c                  C   s   t  } | d t| S N   )setaddlensr   r   r   empty_constructor_usecase+   s    
r)   c                 C   s   t | }t|S r   )r$   r&   r   r(   r   r   r   constructor_usecase0   s    r+   c                 C   s$   t | }g }|D ]}|| q|S r   r$   append)r   r(   lvr   r   r   iterator_usecase4   s
    r0   c                 C   s,   t  }||  || || t|S r   )r$   updatelist)r   r   cr(   r   r   r   update_usecase;   s
    


r4   c                 C   s   t | dd  }t|S r"   )r$   boolr*   r   r   r   bool_usecaseB   s    r6   c                 C   s$   t | }|D ]}|| qt|S r   )r$   remover2   r   r   r(   r/   r   r   r   remove_usecaseG   s    r9   c                 C   s$   t | }|D ]}|| qt|S r   )r$   discardr2   r8   r   r   r   discard_usecaseM   s    r;   c                 C   s2   t | }tdD ]}|| || qt|S )Ni  )r$   ranger%   r:   r2   )r   ur/   r(   ir   r   r   add_discard_usecaseS   s
    
r?   c                 C   s,   t | }g }t|dkr(||  q|S Nr   )r$   r&   r-   pop)r   r(   r.   r   r   r   pop_usecaseZ   s
    rB   c                 C   s(   t | }g }|D ]}|||k q|S r   r,   )r   r   r(   r.   r/   r   r   r   contains_usecasea   s
    rC   c                 C   s   t | }|t | t|S r   )r$   difference_updater2   r   r   r(   r   r   r   difference_update_usecaseh   s    rF   c                 C   s   t | }|t | t|S r   )r$   intersection_updater2   rE   r   r   r   intersection_update_usecasem   s    rH   c                 C   s   t | }|t | t|S r   )r$   symmetric_difference_updater2   rE   r   r   r   #symmetric_difference_update_usecaser   s    rJ   c                 C   s   t | t |S r   )r$   
isdisjointr   r   r   r   isdisjoint_usecasew   s    rL   c                 C   s   t | t |S r   )r$   issubsetr   r   r   r   issubset_usecasez   s    rN   c                 C   s   t | t |S r   )r$   
issupersetr   r   r   r   issuperset_usecase}   s    rP   c                 C   s    t | }|  t|t|fS r   )r$   clearr&   r2   r   r(   r   r   r   clear_usecase   s    rS   c                 C   s(   t | }| }|  t|t|fS r   )r$   copyrA   r&   r2   r   r(   ssr   r   r   copy_usecase   s    rW   c                 C   s6   t | }|  | }|| d  t|t|fS r@   )r$   rQ   rT   r%   r&   r2   rU   r   r   r   copy_usecase_empty   s
    rX   c                 C   s2   t | }|| | }|  t|t|fS r   )r$   r7   rT   rA   r&   r2   )r   r   r(   rV   r   r   r   copy_usecase_deleted   s
    
rY   c                 C   s   t | }|t |}t|S r   )r$   
differencer2   r   r   sar(   r   r   r   difference_usecase   s    r]   c                 C   s   t | }|t |}t|S r   )r$   intersectionr2   r[   r   r   r   intersection_usecase   s    r_   c                 C   s   t | }|t |}t|S r   )r$   symmetric_differencer2   r[   r   r   r   symmetric_difference_usecase   s    ra   c                 C   s   t | }|t |}t|S r   )r$   unionr2   r[   r   r   r   union_usecase   s    rc   c                 C   s   t | }|S r   )r$   rR   r   r   r   set_return_usecase   s    rd   c                 C   s   dt | d }td|t S )Nzbif 1:
    def operator_usecase(a, b):
        s = set(a) %(op)s set(b)
        return list(s)
    opZoperator_usecasedictr   r   rf   r   r   r   r   make_operator_usecase   s    rj   c                 C   s   dt | d }td|t S )Nzif 1:
    def inplace_operator_usecase(a, b):
        sa = set(a)
        sb = set(b)
        sc = sa
        sc %(op)s sb
        return list(sc), list(sa)
    re   Zinplace_operator_usecaserg   ri   r   r   r   make_inplace_operator_usecase   s    rk   c                 C   s   dt | d }td|t S )NzPif 1:
    def comparison_usecase(a, b):
        return set(a) %(op)s set(b)
    re   Zcomparison_usecaserg   ri   r   r   r   make_comparison_usecase   s    rl   c                 C   s   d S r   r   )xr   r   r   noop   s    rn   c                 C   s   d}| D ]}||7 }q|S )z!
    Expect a set of numbers
    r   r   rm   resr/   r   r   r   unbox_usecase   s    
rq   c                 C   s   d}| D ]}|t |7 }q|S )z 
    Expect a set of tuples
    r   r&   ro   r   r   r   unbox_usecase2   s    rs   c                 C   s"   | \}}|}|D ]}||7 }q|S )z2
    Expect a (number, set of numbers) tuple.
    r   rm   r   r   rp   r/   r   r   r   unbox_usecase3   s
    
ru   c                 C   s&   | \}}|}|D ]}|t |7 }q|S )z1
    Expect a (number, set of tuples) tuple.
    rr   rt   r   r   r   unbox_usecase4   s
    rv   c                 C   s&   |  d | | | t| t|fS N*   )r%   r1   r&   r\   sbr   r   r   reflect_simple   s    

r{   c                 C   sL   t |dkrtd} | d | | td}| | | t | t |fS )Nr#   )g      &@g      6@g     @@g      F@g      E@)g     K@g     P@)r&   r$   r%   r1   rI   )r\   rz   Zscr   r   r   reflect_conditional   s    


r|   c                 C   s   |  d td S rw   )r%   ZeroDivisionErrorr'   r   r   r   reflect_exception  s    
r~   c                 C   s   |  |  | |kS r   )r%   rA   ry   r   r   r   reflect_dual  s    r   c                 C   s4   t  }g }| D ] }||kr|| || q|S r   )r$   r%   r-   )srcseenrp   r/   r   r   r   unique_usecase  s    
r   c                       sL   e Zd Z fddZdd Zdd Zdd Zd	d
 Zdd Zdd Z	  Z
S )BaseTestc                    s   t t|   td| _d S rw   )superr   setUprandomRandomrndself	__class__r   r   r     s    zBaseTest.setUpc                 C   s   t t|S r   )nparangeintr   stopr   r   r   _range   s    zBaseTest._rangec                    s<    fddt |D }ttjr4tj|jdS |S dS )zD
        Choose *n* possibly duplicate items from sequence.
        c                    s   g | ]} j tqS r   )r   choicer2   r   r>   r   seqr   r   
<listcomp>'  s     z+BaseTest._random_choice.<locals>.<listcomp>dtypeN)r<   
isinstancer   Zndarrayarrayr   )r   r   nr.   r   r   r   _random_choice#  s    zBaseTest._random_choicec                 C   s   |  t|}| ||S )z<
        Get a 1d array with many duplicate values.
        )r   r   sqrtr   r   r   r   r   r   r   duplicates_array-  s    zBaseTest.duplicates_arrayc                 C   s   |  |d }| ||S )z;
        Get a 1d array with values spread around.
        g?)r   r   r   r   r   r   sparse_array4  s    zBaseTest.sparse_arrayc                 C   st   t |tr8| |t t||D ]\}}| || q n8t |trd| |t | t|t| n| || d S r   )r   tupleZassertIsInstancezip_assert_equal_unorderedr2   assertPreciseEqualsorted)r   r   r   r=   r/   r   r   r   r   <  s    

z BaseTest._assert_equal_unorderedc                    s"   t dd  fdd}|S )NTZnopythonc                     s    |  } |  } || d S r   )r   )r   expectedgotcfuncpyfuncr   r   r   checkI  s    z)BaseTest.unordered_checker.<locals>.checkr   r   r   r   r   r   r   unordered_checkerG  s    zBaseTest.unordered_checker)__name__
__module____qualname__r   r   r   r   r   r   r   __classcell__r   r   r   r   r     s   
r   c                   @   s,   e Zd ZefddZefddZdd ZdS )TestSetLiteralsc                 C   s   t d}| j||d d S )N)r#         r   flags)r    run_nullary_func)r   r   r   r   r   r   test_build_setR  s    zTestSetLiterals.test_build_setc                 C   sP   t d}| j||d t d}| j||d\}}| t| t|  d S )N)r#          @y              @r   r   )r   r   )r    r   ZassertIstyperA   )r   r   r   r   r   r   r   r   test_build_heterogeneous_setV  s
    z,TestSetLiterals.test_build_heterogeneous_setc                 C   sH   t | d}t|}tdd|}| }| }| t|t| d S )N2   Tr   )r2   r   r!   r   r   r   )r   r   r   r   r   r   r   r   r   test_build_set_nopython^  s    z'TestSetLiterals.test_build_set_nopythonN)r   r   r   r
   r   r   r   r   r   r   r   r   P  s   r   c                   @   sL  e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd  Zd!d" Zd#d$ Zd%d& Zd'd( Zd)d* Zd+d, Zd-d. Zd/d0 Zd1d2 Zd3d4 Zd5d6 Zd7d8 Zd9d: Zd;d< Z d=d> Z!d?d@ Z"dAdB Z#dCdD Z$dEdF Z%dGdH Z&dIdJ Z'dKdL Z(dMdN Z)dOdP Z*dQS )RTestSetsc                    sd   t tdd     ttdd  fdd}|d |d d S )NTr   c                    s    |  |  d S r   r   )r   r   r   r   r   q  s    z(TestSets.test_constructor.<locals>.check   )r)   r   r   r+   r   r   r   r   r   r   r   test_constructorj  s    zTestSets.test_constructorc                 C   s4   t }tdd|}| d}| ||t| d S )NTr   r   )rd   r   r   assertEqualr$   )r   r   r   r   r   r   r   test_set_returnw  s    
zTestSets.test_set_returnc                 C   s.   t }| |}|| d || d d S Nr   )r0   r   r   r   r   r   r   r   test_iterator~  s    
zTestSets.test_iteratorc                 C   s<   t }| |}| d}| d}| d}|||| d S Nr   )r4   r   r   r   )r   r   r   r   r   r3   r   r   r   test_update  s    



zTestSets.test_updatec                 C   s4   t }| |}| d}|d d d }||| d S )Nr   
   )r9   r   r   r   r   r   r   r   r   r   r   test_remove  s
    

zTestSets.test_removec              	   C   sf   |    t}tdd|}tt| d}|dd  }|d f}| t ||| W 5 Q R X d S )NTr   r   r#   r   )Zdisable_leak_checkr9   r   r   r$   r   assertRaisesKeyError)r   r   r   itemsr   r   r   r   r   test_remove_error  s    
zTestSets.test_remove_errorc                 C   s0   t }| |}| d}| d}||| d S r   )r;   r   r   r   r   r   r   test_discard  s
    


zTestSets.test_discardc                 C   s@   t }| |}d }}||kr.| d\}}q||f|| dS )z
        Check that the insertion logic does not create an infinite lookup
        chain with deleted entries (insertion should happen at the first
        deleted entry, not at the free entry at the end of the chain).
        See issue #1913.
        Nr   )r?   r   r   r   r   r   r   test_add_discard  s    
zTestSets.test_add_discardc                 C   s    t }| |}|| d d S r   )rB   r   r   r   r   r   r   test_pop  s    
zTestSets.test_popc                    sD   t tdd  fdd}d}d}||| d S )NTr   c                    s    | | | | d S r   r   r   r   r   r   r     s    z%TestSets.test_contains.<locals>.checkr   )rC   r   r   )r   r   r   r   r   r   r   test_contains  s    

zTestSets.test_containsc                 C   sF   |  |}d}t||D ]&\}}| |}| |}||| qd S )Nr#   r   i  r   	itertoolsproductr   )r   r   r   sizesnanbr   r   r   r   r   _test_xxx_update  s    


zTestSets._test_xxx_updatec                 C   s   |  t d S r   )r   rF   r   r   r   r   test_difference_update  s    zTestSets.test_difference_updatec                 C   s   |  t d S r   )r   rH   r   r   r   r   test_intersection_update  s    z!TestSets.test_intersection_updatec                 C   s   |  t d S r   )r   rJ   r   r   r   r    test_symmetric_difference_update  s    z)TestSets.test_symmetric_difference_updatec                    s   t dd  fdd}ttddg\}}||@ || ||B ||A g}dd |D }t||D ]\}}||| qrd S )	NTr   c                    s    | | | | d S r   r   r   r   r   r   r     s    z(TestSets._test_comparator.<locals>.checkr      c                 S   s   g | ]}t |qS r   )r   r   rm   r   r   r   r     s     z-TestSets._test_comparator.<locals>.<listcomp>)r   mapr$   r   r   r   )r   r   r   r   r   r   r   r   r   _test_comparator  s    zTestSets._test_comparatorc                 C   s   |  t d S r   )r   rL   r   r   r   r   test_isdisjoint  s    zTestSets.test_isdisjointc                 C   s   |  t d S r   )r   rN   r   r   r   r   test_issubset  s    zTestSets.test_issubsetc                 C   s   |  t d S r   )r   rP   r   r   r   r   test_issuperset  s    zTestSets.test_issupersetc                 C   s    t }| |}|| d d S r   )rS   r   r   r   r   r   r   
test_clear  s    
zTestSets.test_clearc                 C   sx   t }| |}|| d t}| |}| d}|| t}| |}|dd | d}|||t|d   d S )Nr   r#   r#   r         r   )rW   r   r   rX   rY   r&   )r   r   r   r   r   r   r   	test_copy  s    





zTestSets.test_copyc                 C   s.   t }| |}|| d || d d S )Nr#   r   )r6   r   r   r   r   r   r   	test_bool
  s    
zTestSets.test_boolc                 C   sX   |  |}d\}}||| d}t||D ]&\}}| |}| |}||| q,d S )N)r   )r   r      r   rx   r   r   )r   r   r   r   r   r   r   r   r   r   r   _test_set_operator  s    



zTestSets._test_set_operatorc                 C   s   |  t d S r   )r   r]   r   r   r   r   test_difference  s    zTestSets.test_differencec                 C   s   |  t d S r   )r   r_   r   r   r   r   test_intersection   s    zTestSets.test_intersectionc                 C   s   |  t d S r   )r   ra   r   r   r   r   test_symmetric_difference#  s    z"TestSets.test_symmetric_differencec                 C   s   |  t d S r   )r   rc   r   r   r   r   
test_union&  s    zTestSets.test_unionc                 C   s   |  td d S )N&r   rj   r   r   r   r   test_and)  s    zTestSets.test_andc                 C   s   |  td d S )N|r   r   r   r   r   test_or,  s    zTestSets.test_orc                 C   s   |  td d S )N-r   r   r   r   r   test_sub/  s    zTestSets.test_subc                 C   s   |  td d S )N^r   r   r   r   r   test_xor2  s    zTestSets.test_xorc                 C   s   |  td d S )Nz==r   rl   r   r   r   r   test_eq5  s    zTestSets.test_eqc                 C   s   |  td d S )Nz!=r   r   r   r   r   test_ne8  s    zTestSets.test_nec                 C   s   |  td d S )Nz<=r   r   r   r   r   test_le;  s    zTestSets.test_lec                 C   s   |  td d S )N<r   r   r   r   r   test_lt>  s    zTestSets.test_ltc                 C   s   |  td d S )Nz>=r   r   r   r   r   test_geA  s    zTestSets.test_gec                 C   s   |  td d S )N>r   r   r   r   r   test_gtD  s    zTestSets.test_gtc                 C   s   |  td d S )Nz&=r   rk   r   r   r   r   	test_iandG  s    zTestSets.test_iandc                 C   s   |  td d S )Nz|=r  r   r   r   r   test_iorJ  s    zTestSets.test_iorc                 C   s   |  td d S )Nz-=r  r   r   r   r   	test_isubM  s    zTestSets.test_isubc                 C   s   |  td d S )Nz^=r  r   r   r   r   	test_ixorP  s    zTestSets.test_ixorN)+r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r	  r
  r   r   r   r   r   h  sP   	
	r   c                   @   s   e Zd ZdZdd ZdS )TestFloatSetsz-
    Test sets with floating-point keys.
    c                 C   s   t j|t jdt d S )Nr   g?)r   r   Zfloat32r   r   r   r   r   [  s    zTestFloatSets._rangeNr   r   r   __doc__r   r   r   r   r   r  T  s   r  c                   @   s   e Zd ZdZdd ZdS )TestTupleSetsz$
    Test sets with tuple keys.
    c                 C   sL   t j|t jd}|d@ }|d@ t j}|d? d@ t j}tt|||S )Nr   l   UU*UU* l   *UU     r#   )r   r   Zint64ZastypeZint32Zbool_r2   r   )r   r   r   r   r3   dr   r   r   r   c  s
    zTestTupleSets._rangeNr  r   r   r   r   r  _  s   r  c                   @   s   e Zd ZdZdd ZdS )TestUnicodeSetszR
    Test sets with unicode keys. For the purpose of testing refcounted sets.
    c                 C   s   dd t t|D S )Nc                 S   s   g | ]}d  |qS )zA{})formatr   r   r   r   r   p  s     z*TestUnicodeSets._range.<locals>.<listcomp>)r<   r   r   r   r   r   r   o  s    zTestUnicodeSets._rangeNr  r   r   r   r   r  k  s   r  c                   @   sN   e Zd ZdZejdd Zdd Zdd Zdd	 Z	d
d Z
dd Zdd ZdS )TestUnboxingz>
    Test unboxing of Python sets into native Numba sets.
    c              	   c   s:   |  t}d V  W 5 Q R X |d k	r6| t|j| d S r   )r   	TypeErrorZassertRegexpMatchesstr	exception)r   msgraisesr   r   r   assert_type_errorx  s    zTestUnboxing.assert_type_errorc                    s"   t dd  fdd}|S )NTr   c                    s    | } | } || d S r   r   )r   r   r   r   r   r   r     s    z'TestUnboxing.check_unary.<locals>.checkr   r   r   r   r   check_unary  s    zTestUnboxing.check_unaryc                 C   s>   |  t}|tddg |tddg |ttd d S )Nr#   r   y              ?y              @d   )r  rq   r$   r<   r   r   r   r   test_numbers  s    
zTestUnboxing.test_numbersc                 C   s.   |  t}|tddg |tddg d S )N)r#   r   )r   r   )r#                  @)r   y              @)r  rs   r$   r   r   r   r   test_tuples  s    
zTestUnboxing.test_tuplesc                 C   s$   |  t}|dtdddgf d S )Nr#   r   r   r   )r  ru   r$   r   r   r   r   test_set_inside_tuple  s    
z"TestUnboxing.test_set_inside_tuplec                 C   s"   |  t}|dtddgf d S )Nr#   )r   )r   )r  rv   r$   r   r   r   r   test_set_of_tuples_inside_tuple  s    
z,TestUnboxing.test_set_of_tuples_inside_tuplec              	   C   s  d}t }tdd|}tddg}| | || W 5 Q R X | |tddg | | |tddg W 5 Q R X | | |dtddgf W 5 Q R X | | |tdtddg W 5 Q R X tddg}| ttf}|| W 5 Q R X d S )	Nzcan't unbox heterogeneous setTr   r#   g      @r  )r#   )r   r   )	rn   r   r$   r  r   r   r   
IndexError
ValueError)r   r  r   r   vallstr  r   r   r   test_errors  s      zTestUnboxing.test_errorsN)r   r   r   r  
contextlibcontextmanagerr  r  r  r  r  r   r%  r   r   r   r   r  s  s   
r  c                   @   s@   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dS )TestSetReflectionzE
    Test reflection of native Numba sets on Python set objects.
    c           
   
   C   s   t dd|}tddddgtdgftddddgtdd	d
ddgfg}|D ]|\}}t|}t|}|||}| ||H |||}	| |	| | || | |d |k|	d |k ~~	W 5 Q R X qNd S )NTr   g      ?r   g      @g      @g        g      @g      @g      @g       @g      "@r   )r   r$   assertRefCountr   r   )
r   r   r   Zsamplesdestr   r   r   ZpyresZcresr   r   r   check_reflection  s     

z"TestSetReflection.check_reflectionc                 C   s   |  t d S r   )r+  r{   r   r   r   r   test_reflect_simple  s    z%TestSetReflection.test_reflect_simplec                 C   s   |  t d S r   )r+  r|   r   r   r   r   test_reflect_conditional  s    z*TestSetReflection.test_reflect_conditionalc              
   C   sp   t }tdd|}tdddg}| |< | t || W 5 Q R X | |tddddg W 5 Q R X dS )zd
        When the function exits with an exception, sets should still be
        reflected.
        Tr   r#   r   r   rx   N)r~   r   r$   r)  r   r}   r   )r   r   r   r(   r   r   r   test_reflect_exception  s    z(TestSetReflection.test_reflect_exceptionc                 C   sp   t }tdd|}tdddg}| }|||}|||}| || | || | t|t| dS )zf
        When the same set object is reflected twice, behaviour should
        be consistent.
        Tr   r#   r   r   N)r   r   r$   rT   r   sysgetrefcount)r   r   r   ZpysetZcsetr   r   r   r   r   test_reflect_same_set  s    

z'TestSetReflection.test_reflect_same_setc                 C   sH   t ddt}tdg}dd |D }|| | dd |D | dS )zO
        When the set wasn't mutated, no reflection should take place.
        Tr   y              )@c                 S   s   g | ]}t |qS r   idr   r   r   r   r     s     z8TestSetReflection.test_reflect_clean.<locals>.<listcomp>c                 S   s   g | ]}t |qS r   r2  r   r   r   r   r     s     N)r   rn   r$   r   )r   r   r(   idsr   r   r   test_reflect_clean  s
    
z$TestSetReflection.test_reflect_cleanN)
r   r   r   r  r+  r,  r-  r.  r1  r5  r   r   r   r   r(    s   r(  c                   @   s    e Zd ZdZdd Zdd ZdS )TestExamplesz!
    Examples of using sets.
    c                 C   s.   t }| |}|| d || d d S r   )r   r   r   r   r   r   r   r   test_unique  s    
zTestExamples.test_uniquec                 C   s   dd }|  |}|  d S )Nc                  S   s.   t d} t }|dddh ||  |S )Nr#   r   r   )r   Zuint64r$   r1   r%   )r>   Rr   r   r   impl  s
    

z9TestExamples.test_type_coercion_from_update.<locals>.impl)r   )r   r9  r   r   r   r   test_type_coercion_from_update  s    
z+TestExamples.test_type_coercion_from_updateN)r   r   r   r  r7  r:  r   r   r   r   r6    s   r6  __main__)MZunittestcollectionsr   r&  r   mathr   r/  Znumpyr   Znumba.core.compilerr   r   r   Znumbar   Z
numba.corer   Znumba.tests.supportr	   r
   r   r   r   r   r   r    r!   r)   r+   r0   r4   r6   r9   r;   r?   rB   rC   rF   rH   rJ   rL   rN   rP   rS   rW   rX   rY   r]   r_   ra   rc   rd   rj   rk   rl   rn   rq   rs   ru   rv   r{   r|   r~   r   r   r   r   r   r  r  r  r  r(  r6  r   mainr   r   r   r   <module>   s   
			

6 mBC
