WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 4e267c2

Browse files
authored
add missing import of ellipse in morphology module (#968)
`cucim.skimage.morphology.footprints.ellipse` should also be available via `cucim.skimage.morphology.ellipse` like the other footprints Authors: - Gregory Lee (https://github.com/grlee77) Approvers: - https://github.com/jakirkham URL: #968
1 parent 4170e7c commit 4e267c2

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

python/cucim/src/cucim/skimage/morphology/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
ball,
2020
diamond,
2121
disk,
22+
ellipse,
2223
footprint_from_sequence,
2324
footprint_rectangle,
2425
octagon,
@@ -63,6 +64,7 @@
6364
"footprint_rectangle",
6465
"diamond",
6566
"disk",
67+
"ellipse",
6668
"octahedron",
6769
"ball",
6870
"octagon",

python/cucim/src/cucim/skimage/morphology/tests/test_footprints.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,19 @@
1515
from cupy.testing import assert_array_equal
1616

1717
from cucim.skimage._shared.testing import assert_stacklevel, fetch
18+
19+
# also test that import from top-level morphology namespace work
1820
from cucim.skimage.morphology import (
21+
ball,
22+
diamond,
23+
disk,
24+
ellipse,
1925
footprint_from_sequence,
2026
footprint_rectangle,
2127
footprints,
28+
octagon,
29+
octahedron,
30+
star,
2231
)
2332

2433

@@ -146,14 +155,14 @@ def test_footprint_star(self):
146155
@pytest.mark.parametrize(
147156
"function, args, supports_sequence_decomposition",
148157
[
149-
(footprints.disk, (3,), True),
150-
(footprints.ball, (3,), True),
151-
(footprints.diamond, (3,), True),
152-
(footprints.octahedron, (3,), True),
158+
(disk, (3,), True),
159+
(ball, (3,), True),
160+
(diamond, (3,), True),
161+
(octahedron, (3,), True),
153162
(footprint_rectangle, ((3, 5),), True),
154-
(footprints.ellipse, (3, 4), False),
155-
(footprints.octagon, (3, 4), True),
156-
(footprints.star, (3,), False),
163+
(ellipse, (3, 4), False),
164+
(octagon, (3, 4), True),
165+
(star, (3,), False),
157166
],
158167
)
159168
@pytest.mark.parametrize("dtype", [np.uint8, np.float64])

0 commit comments

Comments
 (0)