Skip to content

Commit d9bfa33

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pygmt/accessors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class GMTDataArrayAccessor:
3131
>>> from pygmt.datasets import load_earth_relief
3232
>>> # Use the global Earth relief grid with 1 degree spacing
3333
>>> grid = load_earth_relief(resolution="01d", registration="pixel")
34-
>>> # See if grid is Gridline or Pixel registration
34+
>>> # See if grid uses Gridline or Pixel registration
3535
>>> grid.gmt.registration
3636
<GridRegistration.PIXEL: 1>
3737
>>> # See if grid is in Cartesian or Geographic coordinate system
@@ -54,7 +54,7 @@ class GMTDataArrayAccessor:
5454
>>> longrid, latgrid = np.meshgrid(lon, lat)
5555
>>> data = np.sin(np.deg2rad(longrid)) * np.cos(np.deg2rad(latgrid))
5656
>>> grid = xr.DataArray(data, coords=[("latitude", lat), ("longitude", lon)])
57-
>>> # Default to a gridline-registrated Cartesian grid
57+
>>> # Default to a gridline-registered Cartesian grid
5858
>>> grid.gmt.registration
5959
<GridRegistration.GRIDLINE: 0>
6060
>>> grid.gmt.gtype
@@ -154,7 +154,7 @@ def registration(self, value):
154154
if value not in GridRegistration.__members__.values():
155155
msg = (
156156
f"Invalid grid registration: '{value}'. "
157-
"Should be either GridRegistration.GRIDLINE or GridRegistration.PIXEL."
157+
"Should be either GridRegistration.GRIDLINE (0) or GridRegistration.PIXEL (1)."
158158
)
159159
raise GMTInvalidInput(msg)
160160
self._registration = GridRegistration(value)

0 commit comments

Comments
 (0)