diff --git a/skimage/restoration/non_local_means.py b/skimage/restoration/non_local_means.py index f727a12d..6dd20af6 100644 --- a/skimage/restoration/non_local_means.py +++ b/skimage/restoration/non_local_means.py @@ -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.") diff --git a/skimage/restoration/tests/test_denoise.py b/skimage/restoration/tests/test_denoise.py index 35e945ec..996c53e3 100644 --- a/skimage/restoration/tests/test_denoise.py +++ b/skimage/restoration/tests/test_denoise.py @@ -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__":