o
    Td                     @   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 u ri a tt  d S d S )N)	_ufunc_db_fill_ufunc_db r   r   d/home/ncw/WWW/www-new/content/articles/pi-bbp/venv/lib/python3.10/site-packages/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   )	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-krC|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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5|j|jd4 | t	j 5|j|jd4 | t	j 5|j |j!d4 | t	j 5|j"|j#d5 | t	j 5|j$|j%d5 | t	j 5|j&|j'd5 | t	j 5|j(|j)d5 | t	j: 5d6|j*i d S )7Nr   )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?   r2   r3   r4   r5   r6   r7   r8   r9   r:   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   zmm->q)zMM->?zmm->?)zMM->MrA   rA   (+  numba.npr   numba.cpythonr   r   r   numba.np.numpy_supportr   np_datetime_isnat_implnpisnatint_invert_implint_negate_implreal_negate_implcomplex_negate_implnegativeint_positive_implreal_positive_implcomplex_positive_implpositiveint_abs_impluint_abs_implreal_abs_implcomplex_abs_implabsoluteint_sign_implreal_sign_implnp_complex_sign_implsignint_or_implint_add_implreal_add_implcomplex_add_impladdint_xor_implint_sub_implreal_sub_implcomplex_sub_implsubtractint_and_implint_mul_implreal_mul_implcomplex_mul_implmultiplydividetrue_dividenp_int_sdiv_implnp_int_udiv_implnp_real_div_implnp_complex_div_implnp_int_truediv_implnp_real_floor_div_implfloor_divideupdatenp_complex_floor_div_implnp_int_srem_implnp_int_urem_implnp_real_mod_impl	remaindernp_int_sdivrem_implnp_int_udivrem_implnp_real_divmod_impldivmodnp_int_fmod_implnp_real_fmod_implfmodnp_real_logaddexp_impl	logaddexpnp_real_logaddexp2_impl
logaddexp2int_power_implreal_power_implnp_complex_power_implpowerreal_float_power_implnp_complex_float_power_implfloat_powernp_gcd_implgcdnp_lcm_impllcmnp_real_rint_implnp_complex_rint_implrintreal_conjugate_implcomplex_conjugate_impl	conjugatenp_real_exp_implnp_complex_exp_implexpnp_real_exp2_implnp_complex_exp2_implexp2np_real_log_implnp_complex_log_impllognp_real_log2_implnp_complex_log2_impllog2np_real_log10_implnp_complex_log10_impllog10np_real_expm1_implnp_complex_expm1_implexpm1np_real_log1p_implnp_complex_log1p_impllog1pnp_real_sqrt_implnp_complex_sqrt_implsqrtnp_int_square_implnp_real_square_implnp_complex_square_implsquarenp_real_cbrt_implcbrtnp_int_reciprocal_implnp_real_reciprocal_implnp_complex_reciprocal_impl
reciprocalnp_real_sin_implnp_complex_sin_implsinnp_real_cos_implnp_complex_cos_implcostan_implnp_real_tan_impltan	asin_implnp_real_asin_implarcsinnp_real_acos_impl	acos_implarccos	atan_implnp_real_atan_implarctannp_real_atan2_implarctan2np_real_hypot_implhypotnp_real_sinh_implnp_complex_sinh_implsinhnp_real_cosh_implnp_complex_cosh_implcoshnp_real_tanh_implnp_complex_tanh_impltanh
asinh_implnp_real_asinh_implarcsinhnp_real_acosh_implnp_complex_acosh_implarccosh
atanh_implnp_real_atanh_implarctanhradians_float_impldeg2radradiansdegrees_float_implrad2degdegreesnp_real_floor_implfloornp_real_ceil_implceilnp_real_trunc_impltruncnp_real_fabs_implfabsint_ugt_implint_sgt_implreal_gt_implnp_complex_gt_implgreaterint_uge_implint_sge_implreal_ge_implnp_complex_ge_implgreater_equalint_ult_implint_slt_implreal_lt_implnp_complex_lt_impllessint_ule_implint_sle_implreal_le_implnp_complex_le_impl
less_equalint_ne_implreal_ne_implnp_complex_ne_impl	not_equalint_eq_implreal_eq_implnp_complex_eq_implequalnp_logical_and_implnp_complex_logical_and_impllogical_andnp_logical_or_implnp_complex_logical_or_impl
logical_ornp_logical_xor_implnp_complex_logical_xor_impllogical_xornp_logical_not_implnp_complex_logical_not_impllogical_notnp_int_smax_implnp_int_umax_implnp_real_maximum_implnp_complex_maximum_implmaximumnp_int_smin_implnp_int_umin_implnp_real_minimum_implnp_complex_minimum_implminimumnp_real_fmax_implnp_complex_fmax_implfmaxnp_real_fmin_implnp_complex_fmin_implfminnp_real_isnan_implnp_complex_isnan_implnp_int_isnan_implisnannp_real_isinf_implnp_complex_isinf_implnp_int_isinf_implisinfnp_real_isfinite_implnp_complex_isfinite_implnp_int_isfinite_implnp_datetime_isfinite_implisfinitenp_real_signbit_implsignbitnp_real_copysign_implcopysignnp_real_nextafter_impl	nextafternp_real_spacing_implspacingnp_real_ldexp_implldexpbitwise_and
bitwise_orbitwise_xorinvertint_shl_impl
left_shiftint_shr_implright_shiftr@   timedelta_neg_impltimedelta_pos_impltimedelta_abs_impltimedelta_sign_impltimedelta_add_impldatetime_plus_timedeltatimedelta_plus_datetimetimedelta_sub_impldatetime_minus_timedeltadatetime_minus_datetimetimedelta_times_numbernumber_times_timedeltatimedelta_over_numbertimedelta_over_timedeltatimedelta_floor_div_timedeltadatetime_eq_datetime_impltimedelta_eq_timedelta_impldatetime_ne_datetime_impltimedelta_ne_timedelta_impldatetime_lt_datetime_impltimedelta_lt_timedelta_impldatetime_le_datetime_impltimedelta_le_timedelta_impldatetime_gt_datetime_impltimedelta_gt_timedelta_impldatetime_ge_datetime_impltimedelta_ge_timedelta_impldatetime_maximum_impltimedelta_maximum_impldatetime_minimum_impltimedelta_minimum_impldatetime_fmax_impltimedelta_fmax_impldatetime_fmin_impltimedelta_fmin_impltimedelta_mod_timedelta)ufunc_dbr   r   r   r   r   r   arcsin_implarctan_implarcsinh_implarctanh_implr@   r   r   r   r   .   s^  

	

	

	

	






















r   )__doc__numpyrI   r   r   r   r
   r   r   r   r   r   <module>   s    
