Skip to content

Commit 97da750

Browse files
committed
Fix return section of _generate_*_mask
The order and type in the Return section didn't match the implementation this should improve the situation.
1 parent 1012921 commit 97da750

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/skimage/draw/_random_shapes.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ def _generate_rectangle_mask(point, image, shape, random):
3333
3434
Returns
3535
-------
36+
indices : tuple
37+
A mask of indices that the shape fills.
3638
label : tuple
3739
A (category, ((r0, r1), (c0, c1))) tuple specifying the category and
3840
bounding box coordinates of the shape.
39-
indices : ndarray of dtype int
40-
A mask of indices that the shape fills.
4141
4242
"""
4343
available_width = min(image[1] - point[1], shape[1]) - shape[0]
@@ -90,11 +90,11 @@ def _generate_circle_mask(point, image, shape, random):
9090
9191
Returns
9292
-------
93+
indices : tuple
94+
A mask of indices that the shape fills.
9395
label : tuple
9496
A (category, ((r0, r1), (c0, c1))) tuple specifying the category and
9597
bounding box coordinates of the shape.
96-
indices : ndarray of dtype int
97-
A mask of indices that the shape fills.
9898
"""
9999
if shape[0] == 1 or shape[1] == 1:
100100
raise ValueError('size must be > 1 for circles')
@@ -153,11 +153,11 @@ def _generate_triangle_mask(point, image, shape, random):
153153
154154
Returns
155155
-------
156+
indices : tuple
157+
A mask of indices that the shape fills.
156158
label : tuple
157159
A (category, ((r0, r1), (c0, c1))) tuple specifying the category and
158160
bounding box coordinates of the shape.
159-
indices : ndarray of dtype int
160-
A mask of indices that the shape fills.
161161
162162
"""
163163
if shape[0] == 1 or shape[1] == 1:
@@ -212,11 +212,11 @@ def _generate_ellipse_mask(point, image, shape, random):
212212
213213
Returns
214214
-------
215+
indices : tuple
216+
A mask of indices that the shape fills.
215217
label : tuple
216218
A (category, ((r0, r1), (c0, c1))) tuple specifying the category and
217219
bounding box coordinates of the shape.
218-
indices : ndarray of dtype int
219-
A mask of indices that the shape fills.
220220
"""
221221
if shape[0] == 1 or shape[1] == 1:
222222
raise ValueError('size must be > 1 for ellipses')

0 commit comments

Comments
 (0)