o
    Ô­j„  ã                   @  sˆ   d dl mZ ddlmZ d dlmZ d dlZG dd„ deƒZG dd	„ d	eƒZ	G d
d„ deƒZ
ddd„Zddd„Zddd„Zddd„ZdS )é    )Úannotationsé   )ÚArray)Ú
NamedTupleNc                   @  s.   e Zd ZU ded< ded< ded< ded< dS )ÚUniqueAllResultr   ÚvaluesÚindicesÚinverse_indicesÚcountsN©Ú__name__Ú
__module__Ú__qualname__Ú__annotations__© r   r   ú[/var/www/html/CropPilot/venv/lib/python3.10/site-packages/numpy/array_api/_set_functions.pyr      s
   
 r   c                   @  ó   e Zd ZU ded< ded< dS )ÚUniqueCountsResultr   r   r
   Nr   r   r   r   r   r      ó   
 r   c                   @  r   )ÚUniqueInverseResultr   r   r	   Nr   r   r   r   r   r   !   r   r   Úxr   Úreturnc                C  sP   t j| jddddd�\}}}}| | j¡}tt |¡t |¡t |¡t |¡ƒS )ú|
    Array API compatible wrapper for :py:func:`np.unique <numpy.unique>`.

    See its docstring for more information.
    TF©Úreturn_countsÚreturn_indexÚreturn_inverseÚ	equal_nan)ÚnpÚuniqueÚ_arrayÚreshapeÚshaper   r   Ú_new)r   r   r   r	   r
   r   r   r   Ú
unique_all&   s   û	ür$   c                C  s(   t j| jddddd�}tdd„ |D ƒŽ S )NTFr   c                 S  s   g | ]}t  |¡‘qS r   )r   r#   )Ú.0Úir   r   r   Ú
<listcomp>G   s    z!unique_counts.<locals>.<listcomp>)r   r   r    r   ©r   Úresr   r   r   Úunique_counts>   s   ûr*   c                C  s<   t j| jddddd�\}}| | j¡}tt |¡t |¡ƒS )r   FTr   )r   r   r    r!   r"   r   r   r#   )r   r   r	   r   r   r   Úunique_inverseJ   s   
û	r+   c                C  s    t j| jddddd�}t |¡S )r   Fr   )r   r   r    r   r#   r(   r   r   r   Úunique_values]   s   û
r,   )r   r   r   r   )r   r   r   r   )r   r   r   r   )r   r   r   r   )Ú
__future__r   Ú_array_objectr   Útypingr   Únumpyr   r   r   r   r$   r*   r+   r,   r   r   r   r   Ú<module>   s    


