
    oh                    t    d dl mZ ddlmZ ddlmZmZ d dlmZm	Z	 d dl
Zddddd	Zddddd
ZddZddZy)    )annotations   )Array)_result_type_real_numeric_dtypes)OptionalTupleNFaxiskeepdimsc         	         | j                   t        vrt        d      t        j                  t        j                  t        j                  | j                  ||                  S )z|
    Array API compatible wrapper for :py:func:`np.argmax <numpy.argmax>`.

    See its docstring for more information.
    z.Only real numeric dtypes are allowed in argmaxr
   )	dtyper   	TypeErrorr   _newnpasarrayargmax_arrayxr   r   s      ^/var/www/html/engine/venv/lib/python3.12/site-packages/numpy/array_api/_searching_functions.pyr   r      F     	ww**HII::bjj188$!RSTT    c         	         | j                   t        vrt        d      t        j                  t        j                  t        j                  | j                  ||                  S )z|
    Array API compatible wrapper for :py:func:`np.argmin <numpy.argmin>`.

    See its docstring for more information.
    z.Only real numeric dtypes are allowed in argminr
   )	r   r   r   r   r   r   r   argminr   r   s      r   r   r      r   r   c               `    t        d t        j                  | j                        D              S )z~
    Array API compatible wrapper for :py:func:`np.nonzero <numpy.nonzero>`.

    See its docstring for more information.
    c              3  F   K   | ]  }t        j                  |        y w)N)r   r   ).0is     r   	<genexpr>znonzero.<locals>.<genexpr>'   s     =1A=s   !)tupler   nonzeror   )r   s    r   r"   r"   !   s"     =

188(<===r   c                  t        |j                  |j                         t        j                  ||      \  }}t        j                  t        j                  | j                  |j                  |j                              S )zz
    Array API compatible wrapper for :py:func:`np.where <numpy.where>`.

    See its docstring for more information.
    )r   r   r   _normalize_two_argsr   r   wherer   )	conditionx1x2s      r   r%   r%   *   sV     288$&&r2.FB::bhhy//BIIFGGr   )r   r   r   zOptional[int]r   boolreturnr   )r   r   r*   zTuple[Array, ...])r&   r   r'   r   r(   r   r*   r   )
__future__r   _array_objectr   _dtypesr   r   typingr   r	   numpyr   r   r   r"   r%    r   r   <module>r1      s9    "   7 "  26 U 26 U>	Hr   