Skip to content

Commit 4d20c08

Browse files
pygmt.grdclip: Remove parameter 'new' (Deprecated since v0.15.0) (#4343)
1 parent 15bd83b commit 4d20c08

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

pygmt/src/grdclip.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@
1010
from pygmt.alias import Alias, AliasSystem
1111
from pygmt.clib import Session
1212
from pygmt.exceptions import GMTInvalidInput
13-
from pygmt.helpers import build_arg_list, deprecate_parameter, fmt_docstring
13+
from pygmt.helpers import build_arg_list, fmt_docstring
1414

1515
__doctest_skip__ = ["grdclip"]
1616

1717

18-
# TODO(PyGMT>=0.19.0): Remove the deprecated "new" parameter.
1918
@fmt_docstring
20-
@deprecate_parameter("new", "replace", "v0.15.0", remove_version="v0.19.0")
2119
def grdclip(
2220
grid: PathLike | xr.DataArray,
2321
outgrid: PathLike | None = None,

pygmt/tests/test_grdclip.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,6 @@ def test_grdclip_replace():
8484
grid = grdclip(grid=grid, replace=[0, 2]) # Replace 0 with 2
8585
npt.assert_array_equal(np.unique(grid), [1, 2])
8686

87-
# Test for the deprecated 'new' parameter
88-
# TODO(PyGMT>=0.19.0): Remove this test below for the 'new' parameter
89-
with pytest.warns(FutureWarning):
90-
grid = grdclip(grid=grid, new=[1, 3]) # Replace 1 with 3
91-
npt.assert_array_equal(np.unique(grid), [2, 3])
92-
9387

9488
def test_grdclip_between_repeated():
9589
"""

0 commit comments

Comments
 (0)