Ë
     \;jþ	  ã                   ó*   — d Z ddlZddlmZ dgZdd„Zy)zb
The arraycrop module contains functions to crop values from the edges of an
n-dimensional array.
é    N)ÚIntegralÚcropc                 óŠ  ‡ — t        j                  ‰ d¬«      Š t        |t        «      r||gg‰ j                  z  }nÆt        |d   t        «      r^t        |«      dk(  r|d   |d   gg‰ j                  z  }nŒt        |«      dk(  r|g‰ j                  z  }nmt        dt        |«      › d�«      ‚t        |«      dk(  r|d   g‰ j                  z  }n3t        |«      ‰ j                  k(  r|}nt        dt        |«      › d�«      ‚t        ˆ fd„t        |«      D «       «      }|rt        j                  ‰ |   |d	¬
«      }|S ‰ |   }|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   ób   •K  — | ]&  \  }\  }}t        |‰j                  |   |z
  «      –— Œ( y ­w)N)ÚsliceÚshape)Ú.0ÚiÚaÚbÚars       €ú_G:\00. PROJECTS\API\Inventory\templateJSON\kerjaOCR\Lib\site-packages\skimage/util/arraycrop.pyÚ	<genexpr>zcrop.<locals>.<genexpr>C   s/   øè ø€ ÐOÑ>N±°±F°Q¸”5˜˜BŸH™H Q™K¨!™O×,Ñ>Nùs   ƒ,/T)Úorderr   )	ÚnpÚarrayÚ
isinstancer   ÚndimÚlenÚ
ValueErrorÚtupleÚ	enumerate)r   Ú
crop_widthr   r   ÚcropsÚslicesÚcroppeds   `      r   r   r      sO  ø€ ô: 
�‰�"˜5Ô	!€Bä�*œhÔ'Ø˜jÐ)Ð*¨R¯W©WÑ4‰Ü	�J˜q‘M¤8Ô	,Üˆz‹?˜aÒØ  ‘m Z°¡]Ð3Ð4°r·w±wÑ>‰EÜ�‹_ Ò!Ø�L 2§7¡7Ñ*‰EäØ4´S¸³_Ð4Eð F5ð 6óð ô
 
ˆZ‹˜AÒ	Ø˜A‘� "§'¡'Ñ)‰Ü	ˆZ‹˜BŸG™GÒ	#Ø‰äØ0´°Z³Ð0Að B1ð 2ó
ð 	
ô ÓO¼iÈÔ>NÓOÓO€FÙÜ—(‘(˜2˜f™:¨U¸Ô>ˆð €Nð �V‘*ˆØ€Nó    )FÚK)Ú__doc__Únumpyr   Únumbersr   Ú__all__r   © r    r   Ú<module>r'      s   ðñó
 Ý àˆ(€ô<r    