Ë
    ÿ[;jØ  ã                   ó    — d dl Zd„ Zdddœd„Zy)é    Nc                 óÈ   — t        | «      dkD  r*| d   dz  dk(  r| d   | d   z
  dk(  rt        j                  }nt        j                  } || «      j	                  t
        «      S )a  Round coords while ensuring successive values are less than 1 apart.

    When rounding coordinates for `line_nd`, we want coordinates that are less
    than 1 apart (always the case, by design) to remain less than one apart.
    However, NumPy rounds values to the nearest *even* integer, so:

    >>> np.round([0.5, 1.5, 2.5, 3.5, 4.5])
    array([0., 2., 2., 4., 4.])

    So, for our application, we detect whether the above case occurs, and use
    ``np.floor`` if so. It is sufficient to detect that the first coordinate
    falls on 0.5 and that the second coordinate is 1.0 apart, since we assume
    by construction that the inter-point distance is less than or equal to 1
    and that all successive points are equidistant.

    Parameters
    ----------
    coords : 1D array of float
        The coordinates array. We assume that all successive values are
        equidistant (``np.all(np.diff(coords) = coords[1] - coords[0])``)
        and that this distance is no more than 1
        (``np.abs(coords[1] - coords[0]) <= 1``).

    Returns
    -------
    rounded : 1D array of int
        The array correctly rounded for an indexing operation, such that no
        successive indices will be more than 1 apart.

    Examples
    --------
    >>> coords0 = np.array([0.5, 1.25, 2., 2.75, 3.5])
    >>> _round_safe(coords0)
    array([0, 1, 2, 3, 4])
    >>> coords1 = np.arange(0.5, 8, 1)
    >>> coords1
    array([0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5])
    >>> _round_safe(coords1)
    array([0, 1, 2, 3, 4, 5, 6, 7])
    é   r   g      à?)ÚlenÚnpÚfloorÚroundÚastypeÚint)ÚcoordsÚ_round_functions     ú]G:\00. PROJECTS\API\Inventory\templateJSON\kerjaOCR\Lib\site-packages\skimage/draw/draw_nd.pyÚ_round_safer      s[   € ôR ˆ6ƒ{�Q‚˜6 !™9 q™=¨CÒ/°F¸1±IÀÀqÁ	Ñ4IÈQÒ4NÜŸ(™(‰äŸ(™(ˆÙ˜6Ó"×)Ñ)¬#Ó.Ð.ó    FT)ÚendpointÚintegerc          
      óà  — t        j                  | «      } t        j                  |«      }t        t        j                  t        j                  t        j
                  || z
  «      «      «      «      }|r|dz  }t        j                  | |||¬«      j                  }|rGt        t        | «      «      D ]  }t        ||dd…f   «      ||dd…f<   Œ |j                  t        «      }t        |«      S )aˆ  Draw a single-pixel thick line in n dimensions.

    The line produced will be ndim-connected. That is, two subsequent
    pixels in the line will be either direct or diagonal neighbors in
    n dimensions.

    Parameters
    ----------
    start : array-like, shape (N,)
        The start coordinates of the line.
    stop : array-like, shape (N,)
        The end coordinates of the line.
    endpoint : bool, optional
        Whether to include the endpoint in the returned line. Defaults
        to False, which allows for easy drawing of multi-point paths.
    integer : bool, optional
        Whether to round the coordinates to integer. If True (default),
        the returned coordinates can be used to directly index into an
        array. `False` could be used for e.g. vector drawing.

    Returns
    -------
    coords : tuple of arrays
        The coordinates of points on the line.

    Examples
    --------
    >>> lin = line_nd((1, 1), (5, 2.5), endpoint=False)
    >>> lin
    (array([1, 2, 3, 4]), array([1, 1, 2, 2]))
    >>> im = np.zeros((6, 5), dtype=int)
    >>> im[lin] = 1
    >>> im
    array([[0, 0, 0, 0, 0],
           [0, 1, 0, 0, 0],
           [0, 1, 0, 0, 0],
           [0, 0, 1, 0, 0],
           [0, 0, 1, 0, 0],
           [0, 0, 0, 0, 0]])
    >>> line_nd([2, 1, 1], [5, 5, 2.5], endpoint=True)
    (array([2, 3, 4, 4, 5]), array([1, 2, 3, 4, 5]), array([1, 1, 2, 2, 2]))
    r   )Únumr   N)r   Úasarrayr
   ÚceilÚmaxÚabsÚlinspaceÚTÚranger   r   r	   Útuple)ÚstartÚstopr   r   Únpointsr   Údims          r   Úline_ndr    4   sº   € ôV �J‰J�uÓ€EÜ�:‰:�dÓ€DÜ”"—'‘'œ"Ÿ&™&¤§¡¨¨u©Ó!5Ó6Ó7Ó8€GÙØ�1‰ˆä�[‰[˜ ¨'¸HÔE×GÑG€FÙÜœ˜U›Ö$ˆCÜ(¨°²Q°©Ó8ˆF�3š�6ŠNð %ð —‘œsÓ#ˆä�‹=Ðr   )Únumpyr   r   r    © r   r   Ú<module>r#      s   ðÛ ò-/ð` &+°Dõ 8r   