+
    Ai1                          ^ RI tR t]3R ltR# )    Nc           	     *  a \         P                  ! V 4      p \        V 4      p\         P                  ! \         P                  ! V 4      4      p\         P                  ! V 4      p\        \         P                  ! V 4      4      pWQ8:  d   \        R4      3V,          # \         P                  ! W%V,          RV,          ,          RR7      pWF8  P                  4       '       d   \        V4       F{  pWG,          Wg&   \        \         P                  ! WG^,           R 4      4      pWQ,          RW',
          ^,
          ,          ,          Wg^,           R% WF8  P                  4       '       g   K{   M	  V^,          P                  \        4      p\         P                  ! V4      P                  \        4      p\        W4       U	U
u. uF  w  r\        V	RV
4      NK  	  up
p	o\         ;QJ d    . V3R lV 4       F  NK  	  5oS# ! V3R lV 4       4      oS# u up
p	i )a  Find `n_points` regularly spaced along `ar_shape`.

The returned points (as slices) should be as close to cubically-spaced as
possible. Essentially, the points are spaced by the Nth root of the input
array size, where N is the number of dimensions. However, if an array
dimension cannot fit a full step size, it is "discarded", and the
computation is done for only the remaining dimensions.

Parameters
----------
ar_shape : array-like of ints
    The shape of the space embedding the grid. ``len(ar_shape)`` is the
    number of dimensions.
n_points : int
    The (approximate) number of points to embed in the space.

Returns
-------
slices : tuple of slice objects
    A slice along each dimension of `ar_shape`, such that the intersection
    of all the slices give the coordinates of regularly spaced points.

    .. versionchanged:: 0.14.1
        In scikit-image 0.14.1 and 0.15, the return type was changed from a
        list to a tuple to ensure `compatibility with Numpy 1.15`_ and
        higher. If your code requires the returned result to be a list, you
        may convert the output of this function to a list with:

        >>> result = list(regular_grid(ar_shape=(3, 20, 40), n_points=8))

        .. _compatibility with NumPy 1.15: https://github.com/numpy/numpy/blob/master/doc/release/1.15.0-notes.rst#deprecations

Examples
--------
>>> ar = np.zeros((20, 40))
>>> g = regular_grid(ar.shape, 8)
>>> g
(slice(5, None, 10), slice(5, None, 10))
>>> ar[g] = 1
>>> ar.sum()
8.0
>>> ar = np.zeros((20, 40))
>>> g = regular_grid(ar.shape, 32)
>>> g
(slice(2, None, 5), slice(2, None, 5))
>>> ar[g] = 1
>>> ar.sum()
32.0
>>> ar = np.zeros((3, 20, 40))
>>> g = regular_grid(ar.shape, 8)
>>> g
(slice(1, None, 3), slice(5, None, 10), slice(5, None, 10))
>>> ar[g] = 1
>>> ar.sum()
8.0
Ng      ?float64dtypec              3   6   <"   T F  pSV,          x  K  	  R # 5i)N ).0islicess   & X/var/www/html/photoedit/myenv/lib/python3.14/site-packages/skimage/util/_regular_grid.py	<genexpr>regular_grid.<locals>.<genexpr>O   s     6o6!99os   )np
asanyarraylenargsortsortfloatprodslicefullanyrangeallastypeintroundziptuple)ar_shapen_pointsndimunsort_dim_idxssorted_dims
space_size	stepsizesdimstartsstartstepr   s   &&         @r   regular_gridr+      s   r }}X&Hx=DjjH!56O''(#Krwwx()Jd~$$H4#*EYWI$$&&;C(-INrww{79'=>?J$.$9sdjSTn?U#VIAgi (--//  1n$$S)F#**3/I:=f:PQ:P;5eE4&:PQFU6o6UFM 6o66FM Rs   =Hc                    \        W4      p\        P                  ! WR7      p^\        P                  ! \        P                  ! WC,          P
                  4      WC,          P                  4      ,           WC&   V# )a  Return an image with ~`n_points` regularly-spaced nonzero pixels.

Parameters
----------
ar_shape : tuple of int
    The shape of the desired output image.
n_points : int
    The desired number of nonzero points.
dtype : numpy data type, optional
    The desired data type of the output.

Returns
-------
seed_img : array of int or bool
    The desired image.

Examples
--------
>>> regular_seeds((5, 5), 4)
array([[0, 0, 0, 0, 0],
       [0, 1, 0, 2, 0],
       [0, 0, 0, 0, 0],
       [0, 3, 0, 4, 0],
       [0, 0, 0, 0, 0]])
r   )r+   r   zerosreshapearangesizeshape)r    r!   r   gridseed_imgs   &&&  r   regular_seedsr4   S   sX    4 +Dxx.H
		(.%%&(<(< HN O    )numpyr   r+   r   r4   r   r5   r   <module>r7      s    L^ -0 r5   