Skip to content

Commit

Permalink
Add return statement to grdclip and grdgradient docstring (#1390)
Browse files Browse the repository at this point in the history
  • Loading branch information
kadatatlukishore committed Jul 22, 2021
1 parent c341628 commit 945bbc5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pygmt/src/grdclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions pygmt/src/grdgradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 945bbc5

Please sign in to comment.