
    `i                     F    d dl Z d dlmZ  e j        dddd          Z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                 6   t          j        |           } | j        dk    rdS t          j        |            | j        d         r| j        }n| }|j        \  }}t           j        d|d|f         \  }}t          |||          }| j        d         rDt          t          j        |                    }t          t          j        |                     }nCt          t          j        |                    }t          t          j        |                     }||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_bands	            s/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/cupyx/scipy/linalg/_array_utils.py	bandwidthr      s   " 	QAv{{v	Q 	w~ C 7DAqz!A#qs(+GW%a'::G 	w~ .7++,,
$)G,,---

7++,,
$)G,,---
z!!    )r   cupy.linalgr   ElementwiseKernelr   r    r   r   <module>r"      s\           1$0!	  *" *" *" *" *"r   