Skip to content

Commit 27dfb33

Browse files
seismanweiji14
andauthored
Update pygmt/src/grdcut.py
Co-authored-by: Wei Ji <[email protected]>
1 parent a108087 commit 27dfb33

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pygmt/src/grdcut.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ def grdcut(grid, outgrid: str | None = None, **kwargs):
9999
>>> new_grid = pygmt.grdcut(grid=grid, region=[12, 15, 21, 24])
100100
"""
101101
inkind = data_kind(grid)
102-
outkind = "grid"
103-
if inkind == "image":
104-
outkind = "image"
102+
outkind = "image" if inkind == "image" else "grid"
105103
if inkind == "file":
106104
realpath = which(str(grid))
107105
if isinstance(realpath, list):

0 commit comments

Comments
 (0)