
    {h-ih                    (   d dl mZ ddlmZmZmZmZmZmZm	Z	m
Z
mZ ddlmZ d dlZdAdZdAdZdAdZdBd	ZdAd
ZdAdZdAdZdBdZdAdZdBdZdBdZdAdZdBdZdBdZdBdZdAdZdAdZ dAdZ!dAdZ"dBdZ#dBdZ$dAdZ%dAdZ&dAdZ'dBdZ(dBdZ)dBd Z*dAd!Z+dAd"Z,dAd#Z-dAd$Z.dBd%Z/dBd&Z0dAd'Z1dAd(Z2dAd)Z3dAd*Z4dBd+Z5dBd,Z6dAd-Z7dBd.Z8dBd/Z9dBd0Z:dAd1Z;dBd2Z<dAd3Z=dBd4Z>dAd5Z?dBd6Z@dAd7ZAdAd8ZBdAd9ZCdAd:ZDdAd;ZEdAd<ZFdBd=ZGdAd>ZHdAd?ZIdAd@ZJy)C    )annotations   )	_boolean_dtypes_floating_dtypes_real_floating_dtypes_complex_floating_dtypes_integer_dtypes_integer_or_boolean_dtypes_real_numeric_dtypes_numeric_dtypes_result_type)ArrayNc                   | j                   t        vrt        d      t        j                  t        j                  | 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 abs)dtyper   	TypeErrorr   _newnpabs_arrayxs    eD:\DhanshreeandTeamAI\Github\ai_code\venv\Lib\site-packages\numpy/array_api/_elementwise_functions.pyr   r      s8     	wwo%@AA::bffQXX&''    c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 acos)r   r   r   r   r   r   arccosr   r   s    r   acosr      9     	ww&&HII::bii)**r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 acosh)r   r   r   r   r   r   arccoshr   r   s    r   acoshr    +   9     	ww&&IJJ::bjj*++r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | 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 add)
r   r   r   r   r   _normalize_two_argsr   r   addr   x1x2s     r   r$   r$   6   sq     
xx&"((/*I@AA288$&&r2.FB::bffRYY		233r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 asin)r   r   r   r   r   r   arcsinr   r   s    r   asinr*   E   r   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 asinh)r   r   r   r   r   r   arcsinhr   r   s    r   asinhr-   Q   r!   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 atan)r   r   r   r   r   r   arctanr   r   s    r   atanr0   ]   r   r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )z~
    Array API compatible wrapper for :py:func:`np.arctan2 <numpy.arctan2>`.

    See its docstring for more information.
    z4Only real floating-point dtypes are allowed in atan2)
r   r   r   r   r   r#   r   r   arctan2r   r%   s     r   atan2r3   i   ss     
xx,,@U0UNOO288$&&r2.FB::bjjBII677r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 atanh)r   r   r   r   r   r   arctanhr   r   s    r   atanhr6   x   r!   r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )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_and)
r   r
   r   r   r   r#   r   r   bitwise_andr   r%   s     r   r8   r8      t     	228855STT288$&&r2.FB::bnnRYY		:;;r   c                  | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t        j                  |j                  dk        rt        d      t	        j                  t        j                  | 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 >= 0)r   r	   r   r   r   r#   r   anyr   
ValueErrorr   
left_shiftr%   s     r   bitwise_left_shiftr>      s     
xx&"((/*IOPP288$&&r2.FB	vvbii!mQRR::bmmBIIryy9::r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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_invert)r   r
   r   r   r   r   invertr   r   s    r   bitwise_invertrA      s9     	ww00VWW::bii)**r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )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_or)
r   r
   r   r   r   r#   r   r   
bitwise_orr   r%   s     r   rC   rC      st     	228855RSS288$&&r2.FB::bmmBIIryy9::r   c                  | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t        j                  |j                  dk        rt        d      t	        j                  t        j                  | j                  |j                              S )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 >= 0)r   r	   r   r   r   r#   r   r;   r   r<   r   right_shiftr%   s     r   bitwise_right_shiftrF      s     
xx&"((/*IPQQ288$&&r2.FB	vvbii!mRSS::bnnRYY		:;;r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )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_xor)
r   r
   r   r   r   r#   r   r   bitwise_xorr   r%   s     r   rH   rH      r9   r   c                   | j                   t        vrt        d      | j                   t        v r| S t	        j
                  t        j                  | j                              S )zx
    Array API compatible wrapper for :py:func:`np.ceil <numpy.ceil>`.

    See its docstring for more information.
    z,Only real numeric dtypes are allowed in ceil)	r   r   r   r	   r   r   r   ceilr   r   s    r   rJ   rJ      sJ     	ww**FGGww/!::bggahh'((r   c                   | j                   t        vrt        d      t        j                  t        j                  |             S )zx
    Array API compatible wrapper for :py:func:`np.conj <numpy.conj>`.

    See its docstring for more information.
    z6Only complex floating-point dtypes are allowed in conj)r   r   r   r   r   r   conjr   s    r   rL   rL      4     	ww..PQQ::bggaj!!r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 cos)r   r   r   r   r   r   cosr   r   s    r   rO   rO      9     	ww&&GHH::bffQXX&''r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 cosh)r   r   r   r   r   r   coshr   r   s    r   rR   rR   
  9     	ww&&HII::bggahh'((r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )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 divide)
r   r   r   r   r   r#   r   r   divider   r%   s     r   rU   rU     ss     
xx''288;K+KJKK288$&&r2.FB::bii		299566r   c                   t        | j                  |j                         t        j                  | |      \  } }t        j                  t        j                  | j                  |j                              S )zz
    Array API compatible wrapper for :py:func:`np.equal <numpy.equal>`.

    See its docstring for more information.
    )r   r   r   r#   r   r   equalr   r%   s     r   rW   rW   #  sN     288$&&r2.FB::bhhryy"))455r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 exp)r   r   r   r   r   r   expr   r   s    r   rY   rY   /  rP   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 expm1)r   r   r   r   r   r   expm1r   r   s    r   r[   r[   :  9     	ww&&IJJ::bhhqxx())r   c                   | j                   t        vrt        d      | j                   t        v r| S t	        j
                  t        j                  | j                              S )zz
    Array API compatible wrapper for :py:func:`np.floor <numpy.floor>`.

    See its docstring for more information.
    z-Only real numeric dtypes are allowed in floor)	r   r   r   r	   r   r   r   floorr   r   s    r   r^   r^   E  J     	ww**GHHww/!::bhhqxx())r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )z
    Array API compatible wrapper for :py:func:`np.floor_divide <numpy.floor_divide>`.

    See its docstring for more information.
    z4Only real numeric dtypes are allowed in floor_divide)
r   r   r   r   r   r#   r   r   floor_divider   r%   s     r   ra   ra   S  ss     
xx++rxx?S/SNOO288$&&r2.FB::boobii;<<r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )z~
    Array API compatible wrapper for :py:func:`np.greater <numpy.greater>`.

    See its docstring for more information.
    z/Only real numeric dtypes are allowed in greater)
r   r   r   r   r   r#   r   r   greaterr   r%   s     r   rc   rc   a  ss     
xx++rxx?S/SIJJ288$&&r2.FB::bjjBII677r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )z
    Array API compatible wrapper for :py:func:`np.greater_equal <numpy.greater_equal>`.

    See its docstring for more information.
    z5Only real numeric dtypes are allowed in greater_equal)
r   r   r   r   r   r#   r   r   greater_equalr   r%   s     r   re   re   o  su     
xx++rxx?S/SOPP288$&&r2.FB::b&&ryy"))<==r   c                   | j                   t        vrt        d      t        j                  t        j                  |             S )zx
    Array API compatible wrapper for :py:func:`np.imag <numpy.imag>`.

    See its docstring for more information.
    z6Only complex floating-point dtypes are allowed in imag)r   r   r   r   r   r   imagr   s    r   rg   rg   }  rM   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 isfinite)r   r   r   r   r   r   isfiniter   r   s    r   ri   ri     8     	wwo%EFF::bkk!((+,,r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 isinf)r   r   r   r   r   r   isinfr   r   s    r   rl   rl     8     	wwo%BCC::bhhqxx())r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 isnan)r   r   r   r   r   r   isnanr   r   s    r   ro   ro     rm   r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )zx
    Array API compatible wrapper for :py:func:`np.less <numpy.less>`.

    See its docstring for more information.
    z,Only real numeric dtypes are allowed in less)
r   r   r   r   r   r#   r   r   lessr   r%   s     r   rq   rq     ss     
xx++rxx?S/SFGG288$&&r2.FB::bggbii344r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )z
    Array API compatible wrapper for :py:func:`np.less_equal <numpy.less_equal>`.

    See its docstring for more information.
    z2Only real numeric dtypes are allowed in less_equal)
r   r   r   r   r   r#   r   r   
less_equalr   r%   s     r   rs   rs     ss     
xx++rxx?S/SLMM288$&&r2.FB::bmmBIIryy9::r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 log)r   r   r   r   r   r   logr   r   s    r   ru   ru     rP   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 log1p)r   r   r   r   r   r   log1pr   r   s    r   rw   rw     r\   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 log2)r   r   r   r   r   r   log2r   r   s    r   ry   ry     rS   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 log10)r   r   r   r   r   r   log10r   r   s    r   r{   r{     r\   r   c                L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )z
    Array API compatible wrapper for :py:func:`np.logaddexp <numpy.logaddexp>`.

    See its docstring for more information.
    z8Only real floating-point dtypes are allowed in logaddexp)
r   r   r   r   r   r#   r   r   	logaddexpr   r%   s     r   r}   r}     ss     
xx,,@U0URSS288$&&r2.FB::bll299bii899r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )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_and)
r   r   r   r   r   r#   r   r   logical_andr   r%   s     r   r   r     q     
xx&"((/*IHII288$&&r2.FB::bnnRYY		:;;r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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_not)r   r   r   r   r   r   logical_notr   r   s    r   r   r     s8     	wwo%HII::bnnQXX.//r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )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_or)
r   r   r   r   r   r#   r   r   
logical_orr   r%   s     r   r   r     sq     
xx&"((/*IGHH288$&&r2.FB::bmmBIIryy9::r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )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_xor)
r   r   r   r   r   r#   r   r   logical_xorr   r%   s     r   r   r   &  r   r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )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 multiply)
r   r   r   r   r   r#   r   r   multiplyr   r%   s     r   r   r   4  q     
xx&"((/*IEFF288$&&r2.FB::bkk"))RYY788r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 negative)r   r   r   r   r   r   negativer   r   s    r   r   r   B  rj   r   c                   t        | j                  |j                         t        j                  | |      \  } }t        j                  t        j                  | j                  |j                              S )z
    Array API compatible wrapper for :py:func:`np.not_equal <numpy.not_equal>`.

    See its docstring for more information.
    )r   r   r   r#   r   r   	not_equalr   r%   s     r   r   r   M  sN     288$&&r2.FB::bll299bii899r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 positive)r   r   r   r   r   r   positiver   r   s    r   r   r   Y  rj   r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )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 pow)
r   r   r   r   r   r#   r   r   powerr   r%   s     r   powr   e  sq     
xx&"((/*I@AA288$&&r2.FB::bhhryy"))455r   c                   | j                   t        vrt        d      t        j                  t        j                  |             S )zx
    Array API compatible wrapper for :py:func:`np.real <numpy.real>`.

    See its docstring for more information.
    z6Only complex floating-point dtypes are allowed in real)r   r   r   r   r   r   realr   s    r   r   r   s  rM   r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )z
    Array API compatible wrapper for :py:func:`np.remainder <numpy.remainder>`.

    See its docstring for more information.
    z1Only real numeric dtypes are allowed in remainder)
r   r   r   r   r   r#   r   r   	remainderr   r%   s     r   r   r   ~  ss     
xx++rxx?S/SKLL288$&&r2.FB::bll299bii899r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 round)r   r   r   r   r   r   roundr   r   s    r   r   r     rm   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 sign)r   r   r   r   r   r   signr   r   s    r   r   r     s8     	wwo%ABB::bggahh'((r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 sin)r   r   r   r   r   r   sinr   r   s    r   r   r     rP   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 sinh)r   r   r   r   r   r   sinhr   r   s    r   r   r     rS   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 square)r   r   r   r   r   r   squarer   r   s    r   r   r     s8     	wwo%CDD::bii)**r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 sqrt)r   r   r   r   r   r   sqrtr   r   s    r   r   r     rS   r   c               L   | j                   t        vs|j                   t        vrt        d      t        | j                   |j                          t	        j
                  | |      \  } }t	        j                  t        j                  | j                  |j                              S )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 subtract)
r   r   r   r   r   r#   r   r   subtractr   r%   s     r   r   r     r   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 tan)r   r   r   r   r   r   tanr   r   s    r   r   r     rP   r   c                   | j                   t        vrt        d      t        j                  t        j                  | j                              S )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 tanh)r   r   r   r   r   r   tanhr   r   s    r   r   r     rS   r   c                   | j                   t        vrt        d      | j                   t        v r| S t	        j
                  t        j                  | j                              S )zz
    Array API compatible wrapper for :py:func:`np.trunc <numpy.trunc>`.

    See its docstring for more information.
    z-Only real numeric dtypes are allowed in trunc)	r   r   r   r	   r   r   r   truncr   r   s    r   r   r     r_   r   )r   r   returnr   )r&   r   r'   r   r   r   )K
__future__r   _dtypesr   r   r   r   r	   r
   r   r   r   _array_objectr   numpyr   r   r   r    r$   r*   r-   r0   r3   r6   r8   r>   rA   rC   rF   rH   rJ   rL   rO   rR   rU   rW   rY   r[   r^   ra   rc   re   rg   ri   rl   ro   rq   rs   ru   rw   ry   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   <module>r      sF   "
 
 
 ! (+,4+,+8,<$;$+;$<"<")"()7	6(**=8>"-**5;(*)*:<0;<9-	:-6":*)()+)9()*r   