
    `i                     (    d dl Z d dl mZ d ZddZdS )    N)_corec                    	 t          |          }n# t          $ r |f}Y nw xY wt          |          }|                    d          t          |          k    r1t	          | t
          j                  rt          j        | d|          S t          j        | d|          }||j        k     rd|j        |z
  z  |z   }t          d t          |j
        |          D                       }|j        dk    rt          j        ||j                  S g }g }t          |j
        |          D ]\  }}	|	dk    r+|                    |           |                    |           6|dk    r+|                    |           |                    |	           g|                    d           |                    |           |                    |	           |                    |           t          j        ||j                  }
|
j        r(t          j        |                    |          |
           |
                    |          S )	a   Construct an array by repeating A the number of times given by reps.

    Args:
        A (cupy.ndarray): Array to transform.
        reps (int or tuple): The number of repeats.

    Returns:
        cupy.ndarray: Transformed array with repeats.

    .. seealso:: :func:`numpy.tile`

       T)copyndminF)r   c              3   &   K   | ]\  }}||z  V  d S N ).0sts      m/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/cupy/_manipulation/tiling.py	<genexpr>ztile.<locals>.<genexpr>!   s*      ::1a!e::::::    r   )dtype)tuple	TypeErrorlencount
isinstancecupyndarrayarrayndimzipshapesizeemptyr   appendr   elementwise_copyreshape)Arepstupdc	shape_outc_shape	ret_shapedim_innreprets              r   tiler-      s9   Dkk   gCA
yy||s3xxJq$,$?$? z!$a0000 JquA...16zzafqj!C'::AGS(9(9:::::Iv{{z)173333GIAGS)) % %199NN6"""V$$$$q[[NN6"""T""""NN1NN6"""T"""V$$$$
*Yag
.
.
.C
x 8qyy113777;;y!!!s    ""c                 .    |                      ||          S )a+  Repeat arrays along an axis.

    Args:
        a (cupy.ndarray): Array to transform.
        repeats (int, list or tuple): The number of repeats.
        axis (int): The axis to repeat.

    Returns:
        cupy.ndarray: Transformed array with repeats.

    .. seealso:: :func:`numpy.repeat`

    )repeat)arepeatsaxiss      r   r/   r/   8   s     88GT"""r   r	   )r   r   r-   r/   r
   r   r   <module>r3      sN          0" 0" 0"f# # # # # #r   