We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2c010c commit 07b2802Copy full SHA for 07b2802
pygmt/xarray/accessor.py
@@ -137,9 +137,11 @@ def __init__(self, xarray_obj: xr.DataArray):
137
# two columns of the shortened summary information of grdinfo.
138
if (_source := self._obj.encoding.get("source")) and Path(_source).exists():
139
with contextlib.suppress(ValueError):
140
- self._registration, self._gtype = map( # type: ignore[assignment]
+ _registration, _gtype = map(
141
int, grdinfo(_source, per_column="n").split()[-2:]
142
)
143
+ self._registration = GridRegistration(_registration)
144
+ self._gtype = GridType(_gtype)
145
146
@property
147
def registration(self) -> GridRegistration:
0 commit comments