Skip to content

Commit 7c043f4

Browse files
willschlitzerMeghan Jones
andauthored
Apply suggestions from code review
Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
1 parent f994467 commit 7c043f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pygmt/src/grdclip.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,17 @@ def grdclip(grid, **kwargs):
8686
>>> grid = pygmt.datasets.load_earth_relief(
8787
... resolution="30m", region=[10, 30, 15, 25]
8888
... ) # doctest: +SKIP
89+
>>> # Report the minimum and maximum data values
90+
>>> [grid.data.min(), grid.data.max()] # doctest: +SKIP
91+
[179.0, 2103.0]
8992
>>> # Create a new grid from an input grid. Set all values below 1,000 to
9093
>>> # 0 and all values above 1,500 to 10,000
9194
>>> new_grid = pygmt.grdclip(
9295
... grid=grid, below=[1000, 0], above=[1500, 10000]
9396
... ) # doctest: +SKIP
97+
>>> # Report the minimum and maximum data values
98+
>>> [new_grid.data.min(), new_grid.data.max()] # doctest: +SKIP
99+
[0.0, 10000.0]
94100
"""
95101
with GMTTempFile(suffix=".nc") as tmpfile:
96102
with Session() as lib:

0 commit comments

Comments
 (0)