Skip to content

Commit d4e33ac

Browse files
committed
run make format and make check
1 parent 64279fb commit d4e33ac

File tree

2 files changed

+34
-33
lines changed

2 files changed

+34
-33
lines changed

pygmt/src/grdvolume.py

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,43 +26,43 @@
2626
@kwargs_to_strings(C="sequence", R="sequence")
2727
def grdvolume(grid, output_type="pandas", outfile=None, **kwargs):
2828
r"""
29-
Determine the volume between the surface of a grid and a plane.
29+
Determine the volume between the surface of a grid and a plane.
3030
31-
Read a 2-D grid file and calculate the volume contained below the surface
32-
and above the plane specified by the given contour (or zero if not given)
33-
and return the contour, area, volume, and maximum mean height
34-
(volume/area). Alternatively, a range of contours can be specified to
35-
return the volume and area inside the contour for all contour values.
36-
Using **-T**, the contour that produced the maximum mean height
37-
(or maximum curvature of heights vs contour value) is returned as well.
31+
Read a 2-D grid file and calculate the volume contained below the surface
32+
and above the plane specified by the given contour (or zero if not given)
33+
and return the contour, area, volume, and maximum mean height
34+
(volume/area). Alternatively, a range of contours can be specified to
35+
return the volume and area inside the contour for all contour values.
36+
Using **-T**, the contour that produced the maximum mean height
37+
(or maximum curvature of heights vs contour value) is returned as well.
3838
39-
{aliases}
39+
{aliases}
4040
41-
Parameters
42-
----------
43-
grid : str or xarray.DataArray
44-
The file name of the input grid or the grid loaded as a DataArray.
45-
This is the only required parameter.
46-
output_type : str
47-
Determine the format the xyz data will be returned in [Default is
48-
``pandas``]:
49-
- ``numpy`` - :class:`numpy.ndarray`
50-
- ``pandas``- :class:`pandas.DataFrame`
51-
- ``file`` - ASCII file (requires ``outfile``)
52-
outfile : str
53-
The file name for the output ASCII file.
54-
{R}
55-
{V}
41+
Parameters
42+
----------
43+
grid : str or xarray.DataArray
44+
The file name of the input grid or the grid loaded as a DataArray.
45+
This is the only required parameter.
46+
output_type : str
47+
Determine the format the xyz data will be returned in [Default is
48+
``pandas``]:
49+
- ``numpy`` - :class:`numpy.ndarray`
50+
- ``pandas``- :class:`pandas.DataFrame`
51+
- ``file`` - ASCII file (requires ``outfile``)
52+
outfile : str
53+
The file name for the output ASCII file.
54+
{R}
55+
{V}
5656
57-
Returns
58-
-------
59-
ret : pandas.DataFrame or numpy.ndarray or None
60-
Return type depends on ``outfile`` and ``output_type``:
61-
- None if ``outfile`` is set (output will be stored in file set by
62-
``outfile``)
63-
- :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is
64-
not set (depends on ``output_type`` [Default is
65-
:class:`pandas.DataFrame`])
57+
Returns
58+
-------
59+
ret : pandas.DataFrame or numpy.ndarray or None
60+
Return type depends on ``outfile`` and ``output_type``:
61+
- None if ``outfile`` is set (output will be stored in file set by
62+
``outfile``)
63+
- :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile``
64+
is not set (depends on ``output_type`` [Default is
65+
:class:`pandas.DataFrame`])
6666
6767
"""
6868
if output_type not in ["numpy", "pandas", "file"]:

pygmt/tests/test_grdvolume.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def fixture_grid():
1616
"""
1717
return load_earth_relief(resolution="01d", region=[-1, 1, -1, 1])
1818

19+
1920
def test_grdvolume_format(grid):
2021
"""
2122
Test that correct formats are returned.

0 commit comments

Comments
 (0)