From b9f119a42876f6e4e5647f7d0428d67ddac228f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jostein=20B=C3=B8=20Fl=C3=B8ystad?= Date: Thu, 11 Jul 2013 18:01:58 +0200 Subject: [PATCH] unwrap: Python 3 compatibility. --- skimage/exposure/unwrap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skimage/exposure/unwrap.py b/skimage/exposure/unwrap.py index f21ec455..4f93ae0a 100644 --- a/skimage/exposure/unwrap.py +++ b/skimage/exposure/unwrap.py @@ -2,6 +2,7 @@ import numpy as np from ._unwrap_2d import unwrap_2d from ._unwrap_3d import unwrap_3d +from .._shared.six import string_types def unwrap(image, wrap_around=False): @@ -44,7 +45,7 @@ def unwrap(image, wrap_around=False): if isinstance(wrap_around, bool): wrap_around = [wrap_around] * image.ndim elif (hasattr(wrap_around, '__getitem__') - and not isinstance(wrap_around, basestring)): + and not isinstance(wrap_around, string_types)): if not len(wrap_around) == image.ndim: raise ValueError('Length of wrap_around must equal the ' 'dimensionality of image')