o
    i                     @   s0   d dl Z d dlmZ e ddddZdd ZdS )	    N)_utilzT A, N r, N czN outzout = A != 0 ? r - c : 0cupyx_scipy_linalg_band_posc           	      C   s   t | } | jdkrdS t|  | jd r| j}n| }|j\}}t jd|d|f \}}t	|||}| jd rLt
t |}t
t | }||fS t
t |}t
t | }||fS )a  Return the lower and upper bandwidth of a 2D numeric array.
    Parameters
    ----------
    a : ndarray
        Input array of size (M, N)
    Returns
    -------
    lu : tuple
        2-tuple of ints indicating the lower and upper bandwidth. A zero
        denotes no sub- or super-diagonal on that side (triangular), and,
        say for M rows (M-1) means that side is full. Same example applies
        to the upper triangular part with (N-1).

    .. seealso:: :func:`scipy.linalg.bandwidth`
    r   )r   r   F_CONTIGUOUS)cupyasarraysizer   
_assert_2dflagsTshapemgrid_kernel_cupy_band_pos_cintamaxamin)	aAmnrow_numcol_numbandpts
upper_band
lower_band r   \/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/cupyx/scipy/linalg/_array_utils.py	bandwidth   s"   





r   )r   cupy.linalgr   ElementwiseKernelr   r   r   r   r   r   <module>   s    