Skip to content

Commit 6430bb2

Browse files
committed
Rename decode_kind to raster_kind
Xref 6a4e1a4 in #3919
1 parent 200ea88 commit 6430bb2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pygmt/datasets/samples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def _load_earth_relief_holes() -> xr.DataArray:
203203
is in meters.
204204
"""
205205
fname = which("@earth_relief_20m_holes.grd", download="c")
206-
return xr.load_dataarray(fname, engine="gmt", decode_kind="grid")
206+
return xr.load_dataarray(fname, engine="gmt", raster_kind="grid")
207207

208208

209209
class GMTSampleData(NamedTuple):

pygmt/helpers/testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def load_static_earth_relief():
154154
A grid of Earth relief for internal tests.
155155
"""
156156
fname = which("@static_earth_relief.nc", download="c")
157-
return xr.load_dataarray(fname, engine="gmt", decode_kind="grid")
157+
return xr.load_dataarray(fname, engine="gmt", raster_kind="grid")
158158

159159

160160
def skip_if_no(package):

pygmt/io.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def load_dataarray(filename_or_obj, **kwargs):
2424
2525
.. deprecated:: v0.16.0
2626
The 'pygmt.io.load_dataarray' function will be removed in v0.20.0. Please use
27-
`xarray.load_dataarray(..., engine='gmt', decode_kind='grid')` instead if you
28-
were reading grids using the engine='netcdf'; otherwise use `decode_kind='image'`
27+
`xarray.load_dataarray(..., engine='gmt', raster_kind='grid')` instead if you
28+
were reading grids using the engine='netcdf'; otherwise use `raster_kind='image'`
2929
if you were reading multi-band images using engine='rasterio'.
3030
3131
Parameters
@@ -48,9 +48,9 @@ def load_dataarray(filename_or_obj, **kwargs):
4848
"""
4949
msg = (
5050
"The 'pygmt.io.load_dataarray' function will be removed in v0.20.0. Please use "
51-
"`xarray.load_dataarray(..., engine='gmt', decode_kind='grid')` instead if you "
51+
"`xarray.load_dataarray(..., engine='gmt', raster_kind='grid')` instead if you "
5252
"were reading grids using the engine='netcdf'; otherwise use "
53-
"`decode_kind='image'` if you were reading multi-band images using "
53+
"`raster_kind='image'` if you were reading multi-band images using "
5454
"engine='rasterio'."
5555
)
5656
warnings.warn(message=msg, category=FutureWarning, stacklevel=1)

0 commit comments

Comments
 (0)