Skip to content

Commit 2e51ba7

Browse files
seismanweiji14
andauthored
Apply suggestions from code review
Co-authored-by: Wei Ji <[email protected]>
1 parent 863ac43 commit 2e51ba7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pygmt/clib/session.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1958,15 +1958,15 @@ def virtualfile_to_raster(
19581958
outgrid: str | None = None,
19591959
) -> xr.DataArray | None:
19601960
"""
1961-
Output a raster data stored in a virtual file to an :class:`xarray.DataArray`
1961+
Output raster data stored in a virtual file to an :class:`xarray.DataArray`
19621962
object.
19631963
19641964
The raster data can be a grid, an image or a cube.
19651965
19661966
Parameters
19671967
----------
19681968
vfname
1969-
The virtual file name that stores the result grid.
1969+
The virtual file name that stores the result grid/image/cube.
19701970
kind
19711971
Type of the raster data. Valid values are ``"grid"``, ``"image"``,
19721972
``"cube"`` or ``None``. If ``None``, will inquire the data type from the

pygmt/datatypes/grid.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class _GMT_GRID(ctp.Structure): # noqa: N801
1414
"""
1515
GMT grid structure for holding a grid and its header.
1616
17-
The class is only meant for internal use and is not exposed to users. See the GMT
17+
This class is only meant for internal use and is not exposed to users. See the GMT
1818
source code gmt_resources.h for the original C structure definitions.
1919
2020
Examples
@@ -192,8 +192,8 @@ def to_dataarray(self) -> xr.DataArray:
192192
if grid[dim][0] > grid[dim][1]:
193193
grid = grid.isel({dim: slice(None, None, -1)})
194194

195-
# Set the gmt accessor.
196-
# Must put at the end. The information get lost after specific grid operation.
195+
# Set GMT accessors.
196+
# Must put at the end, otherwise info gets lost after certain grid operations.
197197
grid.gmt.registration = header.registration
198198
grid.gmt.gtype = header.gtype
199199
return grid

0 commit comments

Comments
 (0)