Skip to content

Commit

Permalink
Fix mode to in_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Dec 4, 2024
1 parent 5dbcce9 commit 744c6d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pygmt/src/grdgradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def grdgradient(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | No
"azimuth, direction, or radiance."
)
raise GMTInvalidInput(msg)
with Session(mode="GMT_IN|GMT_IS_REFERENCE") as lib:
with Session(in_mode="GMT_IN|GMT_IS_REFERENCE") as lib:
with (
lib.virtualfile_in(check_kind="raster", data=grid) as vingrd,
lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd,
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdsample.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def grdsample(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None
>>> # and set both x- and y-spacing to 0.5 arc-degrees
>>> new_grid = pygmt.grdsample(grid=grid, translate=True, spacing=[0.5, 0.5])
"""
with Session(mode="GMT_IN|GMT_IS_REFERENCE") as lib:
with Session(in_mode="GMT_IN|GMT_IS_REFERENCE") as lib:
with (
lib.virtualfile_in(check_kind="raster", data=grid) as vingrd,
lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd,
Expand Down

0 comments on commit 744c6d7

Please sign in to comment.