Skip to content

Commit 8be628e

Browse files
authored
Add common alias cores (x) for grdlandmask (#2944)
Add alias cores (-x) for grdlandmask, and set limit of cores=2 for test_grdlandmask_no_outgrid to make benchmark execution deviate less.
1 parent 3f9d14b commit 8be628e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pygmt/src/grdlandmask.py

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
R="region",
2727
V="verbose",
2828
r="registration",
29+
x="cores",
2930
)
3031
@kwargs_to_strings(I="sequence", R="sequence", N="sequence", E="sequence")
3132
def grdlandmask(**kwargs):
@@ -82,6 +83,7 @@ def grdlandmask(**kwargs):
8283
considered outside [Default is inside].
8384
{verbose}
8485
{registration}
86+
{cores}
8587
8688
Returns
8789
-------

pygmt/tests/test_grdlandmask.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_grdlandmask_no_outgrid(expected_grid):
4949
"""
5050
Test grdlandmask with no set outgrid.
5151
"""
52-
result = grdlandmask(spacing=1, region=[125, 130, 30, 35])
52+
result = grdlandmask(spacing=1, region=[125, 130, 30, 35], cores=2)
5353
# check information of the output grid
5454
assert isinstance(result, xr.DataArray)
5555
assert result.gmt.gtype == 1 # Geographic grid

0 commit comments

Comments
 (0)