diff --git a/pygmt/src/grdclip.py b/pygmt/src/grdclip.py index f0b5dbd7004..bead6dcae74 100644 --- a/pygmt/src/grdclip.py +++ b/pygmt/src/grdclip.py @@ -68,6 +68,15 @@ def grdclip(grid, **kwargs): Set all data[i] == *old* to *new*. This is mostly useful when your data are known to be integer values. {V} + + Returns + ------- + ret: xarray.DataArray or None + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - None if ``outgrid`` is set (grid output will be stored in file set by + ``outgrid``) """ with GMTTempFile(suffix=".nc") as tmpfile: with Session() as lib: diff --git a/pygmt/src/grdgradient.py b/pygmt/src/grdgradient.py index 8dca2018c10..edbebcb402e 100644 --- a/pygmt/src/grdgradient.py +++ b/pygmt/src/grdgradient.py @@ -92,6 +92,15 @@ def grdgradient(grid, **kwargs): {R} {V} {n} + + Returns + ------- + ret: xarray.DataArray or None + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - None if ``outgrid`` is set (grid output will be stored in file set by + ``outgrid``) """ with GMTTempFile(suffix=".nc") as tmpfile: if not args_in_kwargs(args=["A", "D", "E"], kwargs=kwargs):