o
    ˜šÍhõ  ã                   @  s¶   d dl mZ ddlmZ ddlmZ d dlmZmZm	Z	m
Z
 d dlZd dœd)dd„Zd*dd„Zddœd+dd„Zd,dd„Zddœd-dd „Zddœd.d#d$„Zd/d%d&„Zd dœd0d'd(„ZdS )1é    )Úannotationsé   )ÚArray)Úresult_type)ÚListÚOptionalÚTupleÚUnionN©ÚaxisÚarraysú%Union[Tuple[Array, ...], List[Array]]r   úOptional[int]Úreturnr   c               C  s0   t | Ž }tdd„ | D ƒƒ} t tj| ||d�¡S )z†
    Array API compatible wrapper for :py:func:`np.concatenate <numpy.concatenate>`.

    See its docstring for more information.
    c                 s  ó   � | ]}|j V  qd S ©N©Ú_array©Ú.0Úa© r   úh/home/www/facesmatcher.com/frenv/lib/python3.10/site-packages/numpy/array_api/_manipulation_functions.pyÚ	<genexpr>   ó   € zconcat.<locals>.<genexpr>)r   Údtype)r   Útupler   Ú_newÚnpZconcatenate)r   r   r   r   r   r   Úconcat   s   
r   ÚxÚintc               C  ó   t  t | j|¡¡S )z†
    Array API compatible wrapper for :py:func:`np.expand_dims <numpy.expand_dims>`.

    See its docstring for more information.
    )r   r   r   Úexpand_dimsr   ©r    r   r   r   r   r#      ó   r#   ú%Optional[Union[int, Tuple[int, ...]]]c               C  ó   t  tj| j|d�¡S )zx
    Array API compatible wrapper for :py:func:`np.flip <numpy.flip>`.

    See its docstring for more information.
    r
   )r   r   r   Úflipr   r$   r   r   r   r(   #   ó   r(   ÚaxesúTuple[int, ...]c                C  r"   )z‚
    Array API compatible wrapper for :py:func:`np.transpose <numpy.transpose>`.

    See its docstring for more information.
    )r   r   r   Z	transposer   )r    r*   r   r   r   Úpermute_dims.   r%   r,   )ÚcopyÚshaper-   úOptional[Bool]c               C  sF   | j }|r
t |¡}t ||¡}|du rt ||¡stdƒ‚t |¡S )z~
    Array API compatible wrapper for :py:func:`np.reshape <numpy.reshape>`.

    See its docstring for more information.
    Fz-Incompatible shape for in-place modification.)r   r   r-   ÚreshapeZshares_memoryÚAttributeErrorr   r   )r    r.   r-   ÚdataZreshapedr   r   r   r0   8   s   

r0   ÚshiftúUnion[int, Tuple[int, ...]]c               C  s   t  tj| j||d�¡S )zx
    Array API compatible wrapper for :py:func:`np.roll <numpy.roll>`.

    See its docstring for more information.
    r
   )r   r   r   Úrollr   )r    r3   r   r   r   r   r5   O   s   r5   c                C  r'   )z~
    Array API compatible wrapper for :py:func:`np.squeeze <numpy.squeeze>`.

    See its docstring for more information.
    r
   )r   r   r   Úsqueezer   r$   r   r   r   r6   ^   r)   r6   c               C  s.   t | Ž  tdd„ | D ƒƒ} t tj| |d�¡S )zz
    Array API compatible wrapper for :py:func:`np.stack <numpy.stack>`.

    See its docstring for more information.
    c                 s  r   r   r   r   r   r   r   r   o   r   zstack.<locals>.<genexpr>r
   )r   r   r   r   r   Ústack)r   r   r   r   r   r7   g   s   r7   )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.   r+   r    r   r-   r/   r   r   )r3   r4   r    r   r   r&   r   r   )r   r4   r    r   r   r   )r   r   r   r!   r   r   )Ú
__future__r   Z_array_objectr   Z_data_type_functionsr   Útypingr   r   r   r	   Únumpyr   r   r#   r(   r,   r0   r5   r6   r7   r   r   r   r   Ú<module>   s     ÿ
	
üû
	