o
    T=ºiá  ã                   @  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„Zddœd+d d!„Zd,d"d#„Zd dœd-d$d%„ZdS ).é    )Ú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   úmC:\Users\psant\Downloads\PAF backend\school\venv\Lib\site-packages\numpy/array_api/_manipulation_functions.pyÚ	<genexpr>   ó   € zconcat.<locals>.<genexpr>)r   ÚdtypeN)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.
    N)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
   N)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.
    N)r   r   r   Z	transposer   )r    r*   r   r   r   Úpermute_dims.   r%   r,   Úshapec                C  r"   )z~
    Array API compatible wrapper for :py:func:`np.reshape <numpy.reshape>`.

    See its docstring for more information.
    N)r   r   r   Úreshaper   )r    r-   r   r   r   r.   7   r%   r.   Ú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
   N)r   r   r   Úrollr   )r    r/   r   r   r   r   r1   @   s   r1   c                C  r'   )z~
    Array API compatible wrapper for :py:func:`np.squeeze <numpy.squeeze>`.

    See its docstring for more information.
    r
   N)r   r   r   Úsqueezer   r$   r   r   r   r2   O   r)   r2   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   `   r   zstack.<locals>.<genexpr>r
   N)r   r   r   r   r   Ústack)r   r   r   r   r   r3   X   s   r3   )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/   r0   r    r   r   r&   r   r   )r   r0   r    r   r   r   )r   r   r   r!   r   r   )Ú
__future__r   Z_array_objectr   Z_data_type_functionsr   Útypingr   r   r   r	   Znumpyr   r   r#   r(   r,   r.   r1   r2   r3   r   r   r   r   Ú<module>   s    ÿ
	

	û
	