Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add return statement to grdclip and grdgradient docstring #1390

Merged
merged 6 commits into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
kadatatlukishore marked this conversation as resolved.
Show resolved Hide resolved
-------
ret: xarray.DataArray or None
Return type depends on whether the ``outgrid`` parameter is set:

- :class:`xarray.DataArray` if ``outgrid`` is not set
kadatatlukishore marked this conversation as resolved.
Show resolved Hide resolved
- 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