Skip to content

Commit

Permalink
Minor fixes to new polygon2mask module (#3977)
Browse files Browse the repository at this point in the history
- import from local module instead of loading full skimage.draw module.
- remove unnecessary imports from doctests, which are executed in local
  namespace.
  • Loading branch information
jni authored and hmaarrfk committed Jun 25, 2019
1 parent fae4b43 commit 44ab69e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions skimage/draw/_polygon2mask.py
@@ -1,6 +1,6 @@
import numpy as np

from .. import draw
from . import draw


def polygon2mask(image_shape, polygon):
Expand All @@ -26,8 +26,6 @@ def polygon2mask(image_shape, polygon):
Examples
--------
>>> import numpy as np
>>> from skimage.draw import polygon2mask
>>> image_shape = (128, 128)
>>> polygon = np.array([[60, 100], [100, 40], [40, 40]])
>>> mask = polygon2mask(image_shape, polygon)
Expand Down

0 comments on commit 44ab69e

Please sign in to comment.