Don't use two lines to raise an exception with a short message.

This commit is contained in:
John Wiggins
2015-08-28 21:10:39 +02:00
parent c05108da36
commit a0fc75c7cb
+1 -2
View File
@@ -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):