mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-21 12:50:27 +08:00
Changed type of error returned for image dimension strictly greater than 3.
This commit is contained in:
@@ -120,6 +120,6 @@ def nl_means_denoising(image, patch_size=7, patch_distance=11, h=0.1,
|
||||
return np.array(_nl_means_denoising_2drgb(image, patch_size,
|
||||
patch_distance, h))
|
||||
else:
|
||||
raise ValueError("Non local means denoising is only possible for \
|
||||
2D grayscale and RGB images or 3-D grayscale images.")
|
||||
raise NotImplementedError("Non-local means denoising is only \
|
||||
implemented for 2D grayscale and RGB images or 3-D grayscale images.")
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ def test_nl_means_denoising_3d():
|
||||
|
||||
def test_nl_means_denoising_wrong_dimension():
|
||||
img = np.zeros((5, 5, 5, 5))
|
||||
assert_raises(ValueError, restoration.nl_means_denoising, img)
|
||||
assert_raises(NotImplementedError, restoration.nl_means_denoising, img)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user