Ë
    ÿ[;jš  ã                   ó    — d dl ZddlmZ dd„Zy)é    Né   )Ú_spathc           	      ó:  — |dk  r|| j                   z  }d|z  dz   f| j                   dz
  z  }t        j                  |«      |z
  }t        j                  ||t        j                  |«      d¬«      }t        j
                  j                  |«      }t        j                  || j                   |fd¬«      j                  }| j                  d| | j                  |dz   d z   }t        j                  |«      }	t        j
                  j                  |«      }
t        j                  |	|t        j                  |«      d¬«      }t        j                  || j                   |
fd¬«      j                  }t        j                  |	|t        j                  |d|	j                  ¬	«      d¬«      }t        j                  || j                   |
fd¬«      j                  }t        j                  | |¬
«      }|j                  ||d¬«      \  }}|D ]%  }|t!        |«         }|t        j"                  k7  sŒ% n |j%                  «      }|sXt        j&                  |«      }t        j(                  |dd…d|…f   |dd…|dz   d…f   gd¬«      }t        j*                  |«      }|fS )aB  Find the shortest path through an n-d array from one side to another.

    Parameters
    ----------
    arr : ndarray of float64
    reach : int, optional
        By default (``reach = 1``), the shortest path can only move
        one row up or down for every step it moves forward (i.e.,
        the path gradient is limited to 1). `reach` defines the
        number of elements that can be skipped along each non-axis
        dimension at each step.
    axis : int, optional
        The axis along which the path must always move forward (default -1)
    output_indexlist : bool, optional
        See return value `p` for explanation.

    Returns
    -------
    p : iterable of int
        For each step along `axis`, the coordinate of the shortest path.
        If `output_indexlist` is True, then the path is returned as a list of
        n-d tuples that index into `arr`. If False, then the path is returned
        as an array listing the coordinates of the path along the non-axis
        dimensions for each step along the axis dimension. That is,
        `p.shape == (arr.shape[axis], arr.ndim-1)` except that p is squeezed
        before returning so if `arr.ndim == 2`, then
        `p.shape == (arr.shape[axis],)`
    cost : float
        Cost of path.  This is the absolute sum of all the
        differences along the path.

    r   é   r   )ÚaxisÚF)ÚorderNéÿÿÿÿ)Údtype)ÚoffsetsF)Úfind_all_ends)ÚndimÚnpÚindicesÚinsertÚonesÚmultiplyÚreduceÚreshapeÚTÚshapeÚzerosÚfullr   r   ÚMCP_DiffÚ
find_costsÚtupleÚinfÚ	tracebackÚarrayÚconcatenateÚsqueeze)ÚarrÚreachr   Úoutput_indexlistÚoffset_ind_shapeÚoffset_indicesÚoffset_sizer   Únon_axis_shapeÚnon_axis_indicesÚnon_axis_sizeÚstart_indicesÚstartsÚend_indicesÚendsÚmÚcostsr   ÚendÚcosts                       ú\G:\00. PROJECTS\API\Inventory\templateJSON\kerjaOCR\Lib\site-packages\skimage/graph/spath.pyÚshortest_pathr4      s=  € ðH ˆa‚xØ�—‘ÑˆØ˜E™	 A™Ð'¨3¯8©8°a©<Ñ8ÐÜ—Z‘ZÐ 0Ó1°EÑ9€NÜ—Y‘Y˜~¨t´R·W±WÐ=MÓ5NÐUVÔW€NÜ—+‘+×$Ñ$Ð%5Ó6€KÜ�j‰j˜¨#¯(©(°KÐ)@ÈÔL×NÑN€Gð
 —Y‘Y˜u Ð%¨¯	©	°$¸±(°*Ð(=Ñ=€NÜ—z‘z .Ó1ÐÜ—K‘K×&Ñ& ~Ó6€MÜ—I‘IÐ.°´b·h±h¸~Ó6NÐUVÔW€MÜ�Z‰Z˜¨¯©°-Ð'@ÈÔL×NÑN€FÜ—)‘)ØØÜ
�‰� Ð*:×*@Ñ*@ÔAØô	€Kô �:‰:�k C§H¡H¨mÐ#<ÀCÔH×JÑJ€Dô 	�‰˜ WÔ-€AØ—|‘| F¨DÀ�|ÓFÑ€Eˆ9ó ˆØ”U˜3“ZÑ ˆØ”2—6‘6‹>Ùð ð —‘˜CÓ €IáÜ—H‘H˜YÓ'ˆ	Ü—N‘NØ’q˜%˜4˜%�xÑ  )ªA¨t°a©x©z¨MÑ":Ð;À!ô
ˆ	ô —J‘J˜yÓ)ˆ	à�dˆ?Ðó    )r   r
   F)Únumpyr   Ú r   r4   © r5   r3   Ú<module>r9      s   ðÛ Ý ôNr5   