Skip to content

Commit

Permalink
Import rioxarray to register rio accessor
Browse files Browse the repository at this point in the history
Xref #3323
  • Loading branch information
weiji14 committed Sep 30, 2024
1 parent f11decc commit 66183ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pygmt/datasets/earth_day.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
The images are available in various resolutions.
"""

import contextlib
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

with contextlib.suppress(ImportError):
# rioxarray is needed to register the rio accessor
import rioxarray # noqa: F401

__doctest_skip__ = ["load_blue_marble"]


Expand Down
5 changes: 5 additions & 0 deletions pygmt/datasets/earth_night.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
The images are available in various resolutions.
"""

import contextlib
from collections.abc import Sequence
from typing import Literal

import xarray as xr
from pygmt.datasets.load_remote_dataset import _load_remote_dataset

with contextlib.suppress(ImportError):
# rioxarray is needed to register the rio accessor
import rioxarray # noqa: F401

__doctest_skip__ = ["load_black_marble"]


Expand Down

0 comments on commit 66183ed

Please sign in to comment.