Skip to content

Commit 0d7f0ab

Browse files
authored
pygmt.grdproject: Improve the checking of required parameter 'projection'/'J' (#4195)
1 parent 5836af2 commit 0d7f0ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pygmt/src/grdproject.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ def grdproject(
116116
>>> # Project the geographic gridded data onto a rectangular grid
117117
>>> new_grid = pygmt.grdproject(grid=grid, projection="M10c", region=region)
118118
"""
119-
if projection is None:
120-
msg = "The projection must be specified."
119+
if kwargs.get("J", projection) is None:
120+
msg = "Parameter 'projection' must be specified."
121121
raise GMTInvalidInput(msg)
122122

123123
aliasdict = AliasSystem().add_common(

0 commit comments

Comments
 (0)