o
    T=ºi�c  ã                   @  st  d dl mZ ddlmZmZmZmZmZmZ ddl	m
Z
 d dlZd{d	d
„Zd{dd„Zd{dd„Zd|dd„Zd{dd„Zd{dd„Zd{dd„Zd|dd„Zd{dd„Zd|dd„Zd|dd „Zd{d!d"„Zd|d#d$„Zd|d%d&„Zd|d'd(„Zd{d)d*„Zd{d+d,„Zd{d-d.„Zd|d/d0„Zd|d1d2„Z d{d3d4„Z!d{d5d6„Z"d{d7d8„Z#d|d9d:„Z$d|d;d<„Z%d|d=d>„Z&d{d?d@„Z'd{dAdB„Z(d{dCdD„Z)d|dEdF„Z*d|dGdH„Z+d{dIdJ„Z,d{dKdL„Z-d{dMdN„Z.d{dOdP„Z/d|dQdR„Z0d|dSdT„Z1d{dUdV„Z2d|dWdX„Z3d|dYdZ„Z4d|d[d\„Z5d{d]d^„Z6d|d_d`„Z7d{dadb„Z8d|dcdd„Z9d|dedf„Z:d{dgdh„Z;d{didj„Z<d{dkdl„Z=d{dmdn„Z>d{dodp„Z?d{dqdr„Z@d|dsdt„ZAd{dudv„ZBd{dwdx„ZCd{dydz„ZDdS )}é    )Úannotationsé   )Ú_boolean_dtypesÚ_floating_dtypesÚ_integer_dtypesÚ_integer_or_boolean_dtypesÚ_numeric_dtypesÚ_result_type)ÚArrayNÚxr
   Úreturnc                C  ó$   | j tvr	tdƒ‚t t | j¡¡S )zv
    Array API compatible wrapper for :py:func:`np.abs <numpy.abs>`.

    See its docstring for more information.
    z&Only numeric dtypes are allowed in absN)Údtyper   Ú	TypeErrorr
   Ú_newÚnpÚabsÚ_array©r   © r   úlC:\Users\psant\Downloads\PAF backend\school\venv\Lib\site-packages\numpy/array_api/_elementwise_functions.pyr      ó   
r   c                C  r   )z|
    Array API compatible wrapper for :py:func:`np.arccos <numpy.arccos>`.

    See its docstring for more information.
    z.Only floating-point dtypes are allowed in acosN)r   r   r   r
   r   r   Zarccosr   r   r   r   r   Úacos   r   r   c                C  r   )z~
    Array API compatible wrapper for :py:func:`np.arccosh <numpy.arccosh>`.

    See its docstring for more information.
    z/Only floating-point dtypes are allowed in acoshN)r   r   r   r
   r   r   Zarccoshr   r   r   r   r   Úacosh(   r   r   Úx1Úx2c                C  óP   | j tvs
|j tvrtdƒ‚t| j |j ƒ t | |¡\} }t t | j	|j	¡¡S )zv
    Array API compatible wrapper for :py:func:`np.add <numpy.add>`.

    See its docstring for more information.
    z&Only numeric dtypes are allowed in addN)
r   r   r   r	   r
   Ú_normalize_two_argsr   r   Úaddr   ©r   r   r   r   r   r   3   ó
   r   c                C  r   )z|
    Array API compatible wrapper for :py:func:`np.arcsin <numpy.arcsin>`.

    See its docstring for more information.
    z.Only floating-point dtypes are allowed in asinN)r   r   r   r
   r   r   Zarcsinr   r   r   r   r   ÚasinB   r   r!   c                C  r   )z~
    Array API compatible wrapper for :py:func:`np.arcsinh <numpy.arcsinh>`.

    See its docstring for more information.
    z/Only floating-point dtypes are allowed in asinhN)r   r   r   r
   r   r   Zarcsinhr   r   r   r   r   ÚasinhN   r   r"   c                C  r   )z|
    Array API compatible wrapper for :py:func:`np.arctan <numpy.arctan>`.

    See its docstring for more information.
    z.Only floating-point dtypes are allowed in atanN)r   r   r   r
   r   r   Zarctanr   r   r   r   r   ÚatanZ   r   r#   c                C  r   )z~
    Array API compatible wrapper for :py:func:`np.arctan2 <numpy.arctan2>`.

    See its docstring for more information.
    z/Only floating-point dtypes are allowed in atan2N)
r   r   r   r	   r
   r   r   r   Zarctan2r   r   r   r   r   Úatan2f   r    r$   c                C  r   )z~
    Array API compatible wrapper for :py:func:`np.arctanh <numpy.arctanh>`.

    See its docstring for more information.
    z/Only floating-point dtypes are allowed in atanhN)r   r   r   r
   r   r   Zarctanhr   r   r   r   r   Úatanhu   r   r%   c                C  r   )z†
    Array API compatible wrapper for :py:func:`np.bitwise_and <numpy.bitwise_and>`.

    See its docstring for more information.
    z9Only integer or boolean dtypes are allowed in bitwise_andN)
r   r   r   r	   r
   r   r   r   Úbitwise_andr   r   r   r   r   r&   €   ó   ÿþr&   c                C  óh   | j tvs
|j tvrtdƒ‚t| j |j ƒ t | |¡\} }t |jdk ¡r)t	dƒ‚t 
t | j|j¡¡S )z„
    Array API compatible wrapper for :py:func:`np.left_shift <numpy.left_shift>`.

    See its docstring for more information.
    z5Only integer dtypes are allowed in bitwise_left_shiftr   z6bitwise_left_shift(x1, x2) is only defined for x2 >= 0N)r   r   r   r	   r
   r   r   Úanyr   Ú
ValueErrorr   Z
left_shiftr   r   r   r   Úbitwise_left_shift’   ó   r+   c                C  r   )z|
    Array API compatible wrapper for :py:func:`np.invert <numpy.invert>`.

    See its docstring for more information.
    z<Only integer or boolean dtypes are allowed in bitwise_invertN)r   r   r   r
   r   r   Úinvertr   r   r   r   r   Úbitwise_invert¤   r   r.   c                C  r   )z„
    Array API compatible wrapper for :py:func:`np.bitwise_or <numpy.bitwise_or>`.

    See its docstring for more information.
    z8Only integer or boolean dtypes are allowed in bitwise_orN)
r   r   r   r	   r
   r   r   r   Ú
bitwise_orr   r   r   r   r   r/   ¯   r'   r/   c                C  r(   )z†
    Array API compatible wrapper for :py:func:`np.right_shift <numpy.right_shift>`.

    See its docstring for more information.
    z6Only integer dtypes are allowed in bitwise_right_shiftr   z7bitwise_right_shift(x1, x2) is only defined for x2 >= 0N)r   r   r   r	   r
   r   r   r)   r   r*   r   Zright_shiftr   r   r   r   Úbitwise_right_shiftÁ   r,   r0   c                C  r   )z†
    Array API compatible wrapper for :py:func:`np.bitwise_xor <numpy.bitwise_xor>`.

    See its docstring for more information.
    z9Only integer or boolean dtypes are allowed in bitwise_xorN)
r   r   r   r	   r
   r   r   r   Úbitwise_xorr   r   r   r   r   r1   Ò   r'   r1   c                C  ó2   | j tvr	tdƒ‚| j tv r| S t t | j¡¡S )zx
    Array API compatible wrapper for :py:func:`np.ceil <numpy.ceil>`.

    See its docstring for more information.
    z'Only numeric dtypes are allowed in ceilN)	r   r   r   r   r
   r   r   Úceilr   r   r   r   r   r3   ã   ó
   

r3   c                C  r   )zv
    Array API compatible wrapper for :py:func:`np.cos <numpy.cos>`.

    See its docstring for more information.
    z-Only floating-point dtypes are allowed in cosN)r   r   r   r
   r   r   Úcosr   r   r   r   r   r5   ñ   r   r5   c                C  r   )zx
    Array API compatible wrapper for :py:func:`np.cosh <numpy.cosh>`.

    See its docstring for more information.
    z.Only floating-point dtypes are allowed in coshN)r   r   r   r
   r   r   Úcoshr   r   r   r   r   r6   ü   r   r6   c                C  r   )z|
    Array API compatible wrapper for :py:func:`np.divide <numpy.divide>`.

    See its docstring for more information.
    z0Only floating-point dtypes are allowed in divideN)
r   r   r   r	   r
   r   r   r   Údivider   r   r   r   r   r7     r    r7   c                C  ó4   t | j|jƒ t | |¡\} }t t | j|j¡¡S )zz
    Array API compatible wrapper for :py:func:`np.equal <numpy.equal>`.

    See its docstring for more information.
    N)r	   r   r
   r   r   r   Úequalr   r   r   r   r   r9     ó   r9   c                C  r   )zv
    Array API compatible wrapper for :py:func:`np.exp <numpy.exp>`.

    See its docstring for more information.
    z-Only floating-point dtypes are allowed in expN)r   r   r   r
   r   r   Úexpr   r   r   r   r   r;   !  r   r;   c                C  r   )zz
    Array API compatible wrapper for :py:func:`np.expm1 <numpy.expm1>`.

    See its docstring for more information.
    z/Only floating-point dtypes are allowed in expm1N)r   r   r   r
   r   r   Úexpm1r   r   r   r   r   r<   ,  r   r<   c                C  r2   )zz
    Array API compatible wrapper for :py:func:`np.floor <numpy.floor>`.

    See its docstring for more information.
    z(Only numeric dtypes are allowed in floorN)	r   r   r   r   r
   r   r   Úfloorr   r   r   r   r   r=   7  r4   r=   c                C  r   )zˆ
    Array API compatible wrapper for :py:func:`np.floor_divide <numpy.floor_divide>`.

    See its docstring for more information.
    z/Only numeric dtypes are allowed in floor_divideN)
r   r   r   r	   r
   r   r   r   Úfloor_divider   r   r   r   r   r>   E  r    r>   c                C  r   )z~
    Array API compatible wrapper for :py:func:`np.greater <numpy.greater>`.

    See its docstring for more information.
    z*Only numeric dtypes are allowed in greaterN)
r   r   r   r	   r
   r   r   r   Úgreaterr   r   r   r   r   r?   S  r    r?   c                C  r   )zŠ
    Array API compatible wrapper for :py:func:`np.greater_equal <numpy.greater_equal>`.

    See its docstring for more information.
    z0Only numeric dtypes are allowed in greater_equalN)
r   r   r   r	   r
   r   r   r   Úgreater_equalr   r   r   r   r   r@   a  r    r@   c                C  r   )z€
    Array API compatible wrapper for :py:func:`np.isfinite <numpy.isfinite>`.

    See its docstring for more information.
    z+Only numeric dtypes are allowed in isfiniteN)r   r   r   r
   r   r   Úisfiniter   r   r   r   r   rA   o  r   rA   c                C  r   )zz
    Array API compatible wrapper for :py:func:`np.isinf <numpy.isinf>`.

    See its docstring for more information.
    z(Only numeric dtypes are allowed in isinfN)r   r   r   r
   r   r   Úisinfr   r   r   r   r   rB   z  r   rB   c                C  r   )zz
    Array API compatible wrapper for :py:func:`np.isnan <numpy.isnan>`.

    See its docstring for more information.
    z(Only numeric dtypes are allowed in isnanN)r   r   r   r
   r   r   Úisnanr   r   r   r   r   rC   …  r   rC   c                C  r   )zx
    Array API compatible wrapper for :py:func:`np.less <numpy.less>`.

    See its docstring for more information.
    z'Only numeric dtypes are allowed in lessN)
r   r   r   r	   r
   r   r   r   Úlessr   r   r   r   r   rD   �  r    rD   c                C  r   )z„
    Array API compatible wrapper for :py:func:`np.less_equal <numpy.less_equal>`.

    See its docstring for more information.
    z-Only numeric dtypes are allowed in less_equalN)
r   r   r   r	   r
   r   r   r   Ú
less_equalr   r   r   r   r   rE   ž  r    rE   c                C  r   )zv
    Array API compatible wrapper for :py:func:`np.log <numpy.log>`.

    See its docstring for more information.
    z-Only floating-point dtypes are allowed in logN)r   r   r   r
   r   r   Úlogr   r   r   r   r   rF   ¬  r   rF   c                C  r   )zz
    Array API compatible wrapper for :py:func:`np.log1p <numpy.log1p>`.

    See its docstring for more information.
    z/Only floating-point dtypes are allowed in log1pN)r   r   r   r
   r   r   Úlog1pr   r   r   r   r   rG   ·  r   rG   c                C  r   )zx
    Array API compatible wrapper for :py:func:`np.log2 <numpy.log2>`.

    See its docstring for more information.
    z.Only floating-point dtypes are allowed in log2N)r   r   r   r
   r   r   Úlog2r   r   r   r   r   rH   Â  r   rH   c                C  r   )zz
    Array API compatible wrapper for :py:func:`np.log10 <numpy.log10>`.

    See its docstring for more information.
    z/Only floating-point dtypes are allowed in log10N)r   r   r   r
   r   r   Úlog10r   r   r   r   r   rI   Í  r   rI   c                 C  r   )z‚
    Array API compatible wrapper for :py:func:`np.logaddexp <numpy.logaddexp>`.

    See its docstring for more information.
    z3Only floating-point dtypes are allowed in logaddexpN)
r   r   r   r	   r
   r   r   r   Ú	logaddexpr   r   r   r   r   rJ   Ø  r    rJ   c                C  r   )z†
    Array API compatible wrapper for :py:func:`np.logical_and <numpy.logical_and>`.

    See its docstring for more information.
    z.Only boolean dtypes are allowed in logical_andN)
r   r   r   r	   r
   r   r   r   Úlogical_andr   r   r   r   r   rK   æ  r    rK   c                C  r   )z†
    Array API compatible wrapper for :py:func:`np.logical_not <numpy.logical_not>`.

    See its docstring for more information.
    z.Only boolean dtypes are allowed in logical_notN)r   r   r   r
   r   r   Úlogical_notr   r   r   r   r   rL   ô  r   rL   c                C  r   )z„
    Array API compatible wrapper for :py:func:`np.logical_or <numpy.logical_or>`.

    See its docstring for more information.
    z-Only boolean dtypes are allowed in logical_orN)
r   r   r   r	   r
   r   r   r   Ú
logical_orr   r   r   r   r   rM   ÿ  r    rM   c                C  r   )z†
    Array API compatible wrapper for :py:func:`np.logical_xor <numpy.logical_xor>`.

    See its docstring for more information.
    z.Only boolean dtypes are allowed in logical_xorN)
r   r   r   r	   r
   r   r   r   Úlogical_xorr   r   r   r   r   rN     r    rN   c                C  r   )z€
    Array API compatible wrapper for :py:func:`np.multiply <numpy.multiply>`.

    See its docstring for more information.
    z+Only numeric dtypes are allowed in multiplyN)
r   r   r   r	   r
   r   r   r   Úmultiplyr   r   r   r   r   rO     r    rO   c                C  r   )z€
    Array API compatible wrapper for :py:func:`np.negative <numpy.negative>`.

    See its docstring for more information.
    z+Only numeric dtypes are allowed in negativeN)r   r   r   r
   r   r   Únegativer   r   r   r   r   rP   )  r   rP   c                C  r8   )z‚
    Array API compatible wrapper for :py:func:`np.not_equal <numpy.not_equal>`.

    See its docstring for more information.
    N)r	   r   r
   r   r   r   Ú	not_equalr   r   r   r   r   rQ   4  r:   rQ   c                C  r   )z€
    Array API compatible wrapper for :py:func:`np.positive <numpy.positive>`.

    See its docstring for more information.
    z+Only numeric dtypes are allowed in positiveN)r   r   r   r
   r   r   Úpositiver   r   r   r   r   rR   @  r   rR   c                C  r   )zz
    Array API compatible wrapper for :py:func:`np.power <numpy.power>`.

    See its docstring for more information.
    z&Only numeric dtypes are allowed in powN)
r   r   r   r	   r
   r   r   r   Úpowerr   r   r   r   r   ÚpowL  r    rT   c                C  r   )z‚
    Array API compatible wrapper for :py:func:`np.remainder <numpy.remainder>`.

    See its docstring for more information.
    z,Only numeric dtypes are allowed in remainderN)
r   r   r   r	   r
   r   r   r   Ú	remainderr   r   r   r   r   rU   Z  r    rU   c                C  r   )zz
    Array API compatible wrapper for :py:func:`np.round <numpy.round>`.

    See its docstring for more information.
    z(Only numeric dtypes are allowed in roundN)r   r   r   r
   r   r   Úroundr   r   r   r   r   rV   h  r   rV   c                C  r   )zx
    Array API compatible wrapper for :py:func:`np.sign <numpy.sign>`.

    See its docstring for more information.
    z'Only numeric dtypes are allowed in signN)r   r   r   r
   r   r   Úsignr   r   r   r   r   rW   s  r   rW   c                C  r   )zv
    Array API compatible wrapper for :py:func:`np.sin <numpy.sin>`.

    See its docstring for more information.
    z-Only floating-point dtypes are allowed in sinN)r   r   r   r
   r   r   Úsinr   r   r   r   r   rX   ~  r   rX   c                C  r   )zx
    Array API compatible wrapper for :py:func:`np.sinh <numpy.sinh>`.

    See its docstring for more information.
    z.Only floating-point dtypes are allowed in sinhN)r   r   r   r
   r   r   Úsinhr   r   r   r   r   rY   ‰  r   rY   c                C  r   )z|
    Array API compatible wrapper for :py:func:`np.square <numpy.square>`.

    See its docstring for more information.
    z)Only numeric dtypes are allowed in squareN)r   r   r   r
   r   r   Úsquarer   r   r   r   r   rZ   ”  r   rZ   c                C  r   )zx
    Array API compatible wrapper for :py:func:`np.sqrt <numpy.sqrt>`.

    See its docstring for more information.
    z.Only floating-point dtypes are allowed in sqrtN)r   r   r   r
   r   r   Úsqrtr   r   r   r   r   r[   Ÿ  r   r[   c                C  r   )z€
    Array API compatible wrapper for :py:func:`np.subtract <numpy.subtract>`.

    See its docstring for more information.
    z+Only numeric dtypes are allowed in subtractN)
r   r   r   r	   r
   r   r   r   Úsubtractr   r   r   r   r   r\   ª  r    r\   c                C  r   )zv
    Array API compatible wrapper for :py:func:`np.tan <numpy.tan>`.

    See its docstring for more information.
    z-Only floating-point dtypes are allowed in tanN)r   r   r   r
   r   r   Útanr   r   r   r   r   r]   ¸  r   r]   c                C  r   )zx
    Array API compatible wrapper for :py:func:`np.tanh <numpy.tanh>`.

    See its docstring for more information.
    z.Only floating-point dtypes are allowed in tanhN)r   r   r   r
   r   r   Útanhr   r   r   r   r   r^   Ã  r   r^   c                C  r2   )zz
    Array API compatible wrapper for :py:func:`np.trunc <numpy.trunc>`.

    See its docstring for more information.
    z(Only numeric dtypes are allowed in truncN)	r   r   r   r   r
   r   r   Útruncr   r   r   r   r   r_   Î  r4   r_   )r   r
   r   r
   )r   r
   r   r
   r   r
   )EÚ
__future__r   Z_dtypesr   r   r   r   r   r	   Z_array_objectr
   Znumpyr   r   r   r   r   r!   r"   r#   r$   r%   r&   r+   r.   r/   r0   r1   r3   r5   r6   r7   r9   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r   r   r   r   Ú<module>   sx     






















































