U
    ,d                     @   s4   d Z ddlZdadd Zdd Zdd Zd	d
 ZdS )aQ  This file contains information on how to translate different ufuncs
into numba. It is a database of different ufuncs and how each of its
loops maps to a function that implements the inner kernel of that ufunc
(the inner kernel being the per-element function).

Use the function get_ufunc_info to get the information related to the
ufunc
    Nc                   C   s   t d kri a tt  d S )N)	_ufunc_db_fill_ufunc_db r   r   5/tmp/pip-unpacked-wheel-eu7e0c37/numba/np/ufunc_db.py_lazy_init_db   s    r   c                   C   s   t   t S )z+obtain a list of supported ufuncs in the db)r   r   keysr   r   r   r   
get_ufuncs   s    r   c                 C   s   t   t|  S )a  get the lowering information for the ufunc with key ufunc_key.

    The lowering information is a dictionary that maps from a numpy
    loop string (as given by the ufunc types attribute) to a function
    that handles code generation for a scalar version of the ufunc
    (that is, generates the "per element" operation").

    raises a KeyError if the ufunc is not in the ufunc_db
    )r   r   )Z	ufunc_keyr   r   r   get_ufunc_info    s    
r	   c                 C   s  ddl m} ddlm}m}m} ddlm} |j|jd| t	j
< |j|j|j|j|j|j|j|j|j|j|j|j|j|j|jd| t	j< |j|j|j|j|j|j|j|j|j|j|j|j|j|j|jd| t	j< |j|j|j|j|j|j|j|j|j|j|j|j|j|j|jd| t	j< |j|j|j|j|j|j|j|j|j|j|j|j|j|jd| t	j< |j|j|j|j|j|j|j|j|j|j|j|j|j|j |j d	| t	j!< |j"|j#|j#|j#|j#|j#|j#|j#|j#|j#|j#|j$|j$|j%|j%d	| t	j&< |j'|j(|j(|j(|j(|j(|j(|j(|j(|j(|j(|j)|j)|j*|j*d	| t	j+< t	j,t	j-kr|j.|j/|j.|j/|j.|j/|j.|j/|j.|j/|j0|j0|j1|j1d
| t	j,< |j2|j2|j2|j2|j2|j2|j2|j2|j2|j2|j0|j0|j1|j1d| t	j-< |j.|j/|j.|j/|j.|j/|j.|j/|j.|j/|j3|j3d| t	j4< |dk r*| t	j4 5|j6|j6d |j7|j8|j7|j8|j7|j8|j7|j8|j7|j8|j9|j9d| t	j:< |j;|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 5|j(|j)d) |d&kr| t	j: 5d*|j*i d S )+Nr   )npyfuncs)	cmathimplmathimplnumbers)numpy_version)M->?m->?)?->?b->bB->Bh->hH->Hi->iI->Il->lL->Lq->qQ->Qf->fd->dF->FD->D)r   r   r   r   r   r   r   r   r   r   r   r   r   zF->fzD->d)r   r   r   r   r   r   r   r   r   r   r   r   r   r   )??->?bb->bBB->Bhh->hHH->Hii->iII->Ill->lLL->Lqq->qQQ->Qff->fdd->dFF->FDD->D)r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   )zbb->dzBB->dzhh->dzHH->dzii->dzII->dzll->dzLL->dzqq->dzQQ->dr+   r,   r-   r.   )r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   )      )r-   r.   )zbb->bbzBB->BBzhh->hhzHH->HHzii->iizII->IIzll->llzLL->LLzqq->qqzQQ->QQzff->ffzdd->dd)r+   r,   )r+   r,   r-   r.   )
r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   )r   r   r   r   )r   r   )r    zbb->?zBB->?zhh->?zHH->?zii->?zII->?zll->?zLL->?zqq->?zQQ->?zff->?zdd->?zFF->?zDD->?)r   b->?B->?h->?H->?i->?I->?l->?L->?q->?Q->?f->?d->?F->?D->?)r;   r<   r=   r>   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r   )r/      )r   r   )r;   r<   r=   r>   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r   r   r   )r;   r<   )zfi->fzfl->fzdi->dzdl->d)r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   )r   r   r   r   r   r   r   r   r   r   r   )
npdatetimezm->m)mm->mMm->MzmM->M)rA   rB   zMM->m)mq->mmd->mzqm->mzdm->m)rC   rD   zmm->d)rC   rD   )r/      zmm->q)zMM->?zmm->?)zMM->MrA   rA   (+  Znumba.npr
   Znumba.cpythonr   r   r   Znumba.np.numpy_supportr   Znp_datetime_isnat_implnpZisnatZint_invert_implZint_negate_implZreal_negate_implZcomplex_negate_implnegativeZint_positive_implZreal_positive_implZcomplex_positive_implZpositiveZint_abs_implZuint_abs_implZreal_abs_implZcomplex_abs_implabsoluteZint_sign_implZreal_sign_implZnp_complex_sign_implsignZint_or_implZint_add_implZreal_add_implZcomplex_add_impladdZint_xor_implZint_sub_implZreal_sub_implZcomplex_sub_implsubtractZint_and_implZint_mul_implZreal_mul_implZcomplex_mul_implmultiplydivideZtrue_divideZnp_int_sdiv_implZnp_int_udiv_implZnp_real_div_implZnp_complex_div_implZnp_int_truediv_implZnp_real_floor_div_implZfloor_divideupdateZnp_complex_floor_div_implZnp_int_srem_implZnp_int_urem_implZnp_real_mod_impl	remainderZnp_int_sdivrem_implZnp_int_udivrem_implZnp_real_divmod_impldivmodZnp_int_fmod_implZnp_real_fmod_implfmodZnp_real_logaddexp_implZ	logaddexpZnp_real_logaddexp2_implZ
logaddexp2Zint_power_implZreal_power_implZnp_complex_power_implpowerZreal_float_power_implZnp_complex_float_power_implZfloat_powerZnp_gcd_implgcdZnp_lcm_implZlcmZnp_real_rint_implZnp_complex_rint_implZrintZreal_conjugate_implZcomplex_conjugate_impl	conjugateZnp_real_exp_implZnp_complex_exp_implexpZnp_real_exp2_implZnp_complex_exp2_implZexp2Znp_real_log_implZnp_complex_log_impllogZnp_real_log2_implZnp_complex_log2_impllog2Znp_real_log10_implZnp_complex_log10_impllog10Znp_real_expm1_implZnp_complex_expm1_implexpm1Znp_real_log1p_implZnp_complex_log1p_impllog1pZnp_real_sqrt_implZnp_complex_sqrt_implsqrtZnp_int_square_implZnp_real_square_implZnp_complex_square_implZsquareZnp_real_cbrt_implZcbrtZnp_int_reciprocal_implZnp_real_reciprocal_implZnp_complex_reciprocal_implZ
reciprocalZnp_real_sin_implZnp_complex_sin_implsinZnp_real_cos_implZnp_complex_cos_implcostan_implZnp_real_tan_impltanZ	asin_implZnp_real_asin_implZarcsinZnp_real_acos_implZ	acos_implZarccosZ	atan_implZnp_real_atan_implZarctanZnp_real_atan2_implZarctan2Znp_real_hypot_implhypotZnp_real_sinh_implZnp_complex_sinh_implsinhZnp_real_cosh_implZnp_complex_cosh_implcoshZnp_real_tanh_implZnp_complex_tanh_impltanhZ
asinh_implZnp_real_asinh_implZarcsinhZnp_real_acosh_implZnp_complex_acosh_implZarccoshZ
atanh_implZnp_real_atanh_implZarctanhZradians_float_implZdeg2radradiansZdegrees_float_implZrad2degdegreesZnp_real_floor_implfloorZnp_real_ceil_implceilZnp_real_trunc_impltruncZnp_real_fabs_implfabsZint_ugt_implZint_sgt_implZreal_gt_implZnp_complex_gt_implZgreaterZint_uge_implZint_sge_implZreal_ge_implZnp_complex_ge_implZgreater_equalZint_ult_implZint_slt_implZreal_lt_implZnp_complex_lt_implZlessZint_ule_implZint_sle_implZreal_le_implZnp_complex_le_implZ
less_equalZint_ne_implZreal_ne_implZnp_complex_ne_impl	not_equalZint_eq_implZreal_eq_implZnp_complex_eq_implequalZnp_logical_and_implZnp_complex_logical_and_impllogical_andZnp_logical_or_implZnp_complex_logical_or_impl
logical_orZnp_logical_xor_implZnp_complex_logical_xor_impllogical_xorZnp_logical_not_implZnp_complex_logical_not_implZlogical_notZnp_int_smax_implZnp_int_umax_implZnp_real_maximum_implZnp_complex_maximum_implmaximumZnp_int_smin_implZnp_int_umin_implZnp_real_minimum_implZnp_complex_minimum_implZminimumZnp_real_fmax_implZnp_complex_fmax_implZfmaxZnp_real_fmin_implZnp_complex_fmin_implZfminZnp_real_isnan_implZnp_complex_isnan_implZnp_int_isnan_implisnanZnp_real_isinf_implZnp_complex_isinf_implZnp_int_isinf_implisinfZnp_real_isfinite_implZnp_complex_isfinite_implZnp_int_isfinite_implZnp_datetime_isfinite_implisfiniteZnp_real_signbit_implZsignbitZnp_real_copysign_implcopysignZnp_real_nextafter_implZ	nextafterZnp_real_spacing_implspacingZnp_real_ldexp_implldexpZbitwise_andZ
bitwise_orZbitwise_xorinvertZint_shl_implZ
left_shiftZint_shr_implZright_shiftr@   Ztimedelta_neg_implZtimedelta_pos_implZtimedelta_abs_implZtimedelta_sign_implZtimedelta_add_implZdatetime_plus_timedeltaZtimedelta_plus_datetimeZtimedelta_sub_implZdatetime_minus_timedeltaZdatetime_minus_datetimeZtimedelta_times_numberZnumber_times_timedeltaZtimedelta_over_numberZtimedelta_over_timedeltaZtimedelta_floor_div_timedeltaZdatetime_eq_datetime_implZtimedelta_eq_timedelta_implZdatetime_ne_datetime_implZtimedelta_ne_timedelta_implZdatetime_lt_datetime_implZtimedelta_lt_timedelta_implZdatetime_le_datetime_implZtimedelta_le_timedelta_implZdatetime_gt_datetime_implZtimedelta_gt_timedelta_implZdatetime_ge_datetime_implZtimedelta_ge_timedelta_implZdatetime_maximum_implZtimedelta_maximum_implZdatetime_minimum_implZtimedelta_minimum_implZdatetime_fmax_implZtimedelta_fmax_implZdatetime_fmin_implZtimedelta_fmin_implZtimedelta_mod_timedelta)Zufunc_dbr
   r   r   r   r   r^   Zarcsin_implZarctan_implZarcsinh_implZarctanh_implr@   r   r   r   r   .   s   





	
 
 
 
 







 











 r   )__doc__ZnumpyrF   r   r   r   r	   r   r   r   r   r   <module>   s   
