Skip to content

Commit

Permalink
remove deprecated seed argument from random_noise
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Lee <[email protected]>
  • Loading branch information
grlee77 committed Oct 2, 2024
1 parent 057ee02 commit ab427a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
8 changes: 1 addition & 7 deletions python/cucim/src/cucim/skimage/util/noise.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import cupy as cp

from .._shared.utils import DEPRECATED, deprecate_parameter
from .dtype import img_as_float

__all__ = ["random_noise"]
Expand Down Expand Up @@ -54,12 +53,7 @@ def _bernoulli(p, shape, *, rng):
return rng.random(shape) <= p


@deprecate_parameter(
"seed", new_name="rng", start_version="23.12", stop_version="24.12"
)
def random_noise(
image, mode="gaussian", rng=None, clip=True, *, seed=DEPRECATED, **kwargs
):
def random_noise(image, mode="gaussian", rng=None, clip=True, **kwargs):
"""
Function to add random noise of various types to a floating-point image.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ def test_set_seed():
assert_array_equal(test, random_noise(cam, rng=seed))


def test_random_noise_futurewarning():
seed = 42
cam = cp.asarray(camerad)
with pytest.warns(FutureWarning):
test = random_noise(cam, seed=seed)
assert_array_equal(test, random_noise(cam, rng=seed))


def test_salt():
amount = 0.15
cam = img_as_float(camerad)
Expand Down

0 comments on commit ab427a4

Please sign in to comment.