§
    )Áôg¶	  ã                   ó,   — d Z ddlZddlmZ dgZdd„ZdS )	zb
The arraycrop module contains functions to crop values from the edges of an
n-dimensional array.
é    N)ÚIntegralÚcropFÚKc                 óè  ‡ — t          j        ‰ d¬¦  «        Š t          |t          ¦  «        r||gg‰ j        z  }nçt          |d         t          ¦  «        rlt          |¦  «        dk    r|d         |d         gg‰ j        z  }nŸt          |¦  «        dk    r|g‰ j        z  }n€t          dt          |¦  «        › d�¦  «        ‚t          |¦  «        dk    r|d         g‰ j        z  }n;t          |¦  «        ‰ j        k    r|}n t          dt          |¦  «        › d�¦  «        ‚t          ˆ fd„t          |¦  «        D ¦   «         ¦  «        }|rt          j        ‰ |         |d	¬
¦  «        }n‰ |         }|S )a3  Crop array `ar` by `crop_width` along each dimension.

    Parameters
    ----------
    ar : array-like of rank N
        Input array.
    crop_width : {sequence, int}
        Number of values to remove from the edges of each axis.
        ``((before_1, after_1),`` ... ``(before_N, after_N))`` specifies
        unique crop widths at the start and end of each axis.
        ``((before, after),) or (before, after)`` specifies
        a fixed start and end crop for every axis.
        ``(n,)`` or ``n`` for integer ``n`` is a shortcut for
        before = after = ``n`` for all axes.
    copy : bool, optional
        If `True`, ensure the returned array is a contiguous copy. Normally,
        a crop operation will return a discontiguous view of the underlying
        input array.
    order : {'C', 'F', 'A', 'K'}, optional
        If ``copy==True``, control the memory layout of the copy. See
        ``np.copy``.

    Returns
    -------
    cropped : array
        The cropped array. If ``copy=False`` (default), this is a sliced
        view of the input array.
    F)Úcopyr   é   é   z"crop_width has an invalid length: zO
crop_width should be a sequence of N pairs, a single pair, or a single integerc              3   ó`   •K  — | ](\  }\  }}t          |‰j        |         |z
  ¦  «        V — Œ)d S )N)ÚsliceÚshape)Ú.0ÚiÚaÚbÚars       €ú_/var/www/html/bac/bac_backend/python/env/lib/python3.11/site-packages/skimage/util/arraycrop.pyú	<genexpr>zcrop.<locals>.<genexpr>C   s?   øè è € ÐOÐO±°±F°Q¸•5˜˜BœH QœK¨!™OÑ,Ô,ÐOÐOÐOÐOÐOÐOó    T)Úorderr   )	ÚnpÚarrayÚ
isinstancer   ÚndimÚlenÚ
ValueErrorÚtupleÚ	enumerate)r   Ú
crop_widthr   r   ÚcropsÚslicesÚcroppeds   `      r   r   r      s¢  ø€ õ: 
Œ�"˜5Ð	!Ñ	!Ô	!€Bå�*�hÑ'Ô'ð 
Ø˜jÐ)Ð*¨R¬WÑ4ˆˆÝ	�J˜q”M¥8Ñ	,Ô	,ð 
Ýˆz‰?Œ?˜aÒÐØ  ”m Z°¤]Ð3Ð4°r´wÑ>ˆEˆEÝ�‰_Œ_ Ò!Ð!Ø�L 2¤7Ñ*ˆEˆEåð6µS¸±_´_ð 6ð 6ð 6ñô ð õ
 
ˆZ‰Œ˜AÒ	Ð	Ø˜A”� "¤'Ñ)ˆˆÝ	ˆZ‰Œ˜BœGÒ	#Ð	#Øˆˆåð2µ°Z±´ð 2ð 2ð 2ñ
ô 
ð 	
õ ÐOÐOÐOÐO½iÈÑ>NÔ>NÐOÑOÔOÑOÔO€FØð Ý”(˜2˜fœ:¨U¸Ð>Ñ>Ô>ˆˆà�V”*ˆØ€Nr   )Fr   )Ú__doc__Únumpyr   Únumbersr   Ú__all__r   © r   r   ú<module>r'      sT   ððð ð
 Ð Ð Ð Ø Ð Ð Ð Ð Ð àˆ(€ð<ð <ð <ð <ð <ð <r   