From a0fc75c7cb335264f46ee1a88f83624734dc4bfe Mon Sep 17 00:00:00 2001 From: John Wiggins Date: Fri, 28 Aug 2015 21:10:39 +0200 Subject: [PATCH] Don't use two lines to raise an exception with a short message. --- skimage/filters/_gaussian.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/skimage/filters/_gaussian.py b/skimage/filters/_gaussian.py index 643dca05..85b572ca 100644 --- a/skimage/filters/_gaussian.py +++ b/skimage/filters/_gaussian.py @@ -94,8 +94,7 @@ def gaussian_filter(image, sigma, output=None, mode='nearest', cval=0, warnings.warn(RuntimeWarning(msg)) multichannel = True if np.any(np.asarray(sigma) < 0.0): - msg = "Sigma values less than zero are not valid" - raise ValueError(msg) + raise ValueError("Sigma values less than zero are not valid") if multichannel: # do not filter across channels if not isinstance(sigma, coll.Iterable):