Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions pygmt/datasets/earth_age.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@
The grids are available in various resolutions.
"""

from collections.abc import Sequence
from typing import Literal

from pygmt.datasets.load_remote_dataset import _load_remote_dataset
from pygmt.helpers import kwargs_to_strings

__doctest_skip__ = ["load_earth_age"]


@kwargs_to_strings(region="sequence")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be removed because region is passed to _load_remote_dataset and in that function region can be a sequence.

def load_earth_age(
resolution: Literal[
"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"
] = "01d",
region=None,
region: Sequence[float] | None = None,
registration: Literal["gridline", "pixel"] = "gridline",
):
r"""
Expand Down Expand Up @@ -56,13 +55,10 @@ def load_earth_age(
resolution
The grid resolution. The suffix ``d`` and ``m`` stand for arc-degrees and
arc-minutes.

region : str or list
The subregion of the grid to load, in the form of a list
[*xmin*, *xmax*, *ymin*, *ymax*] or a string *xmin/xmax/ymin/ymax*.
Required for grids with resolutions higher than 5
arc-minutes (i.e., ``"05m"``).

region
The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*,
*ymin*, *ymax*]. Required for grids with resolutions higher than 5 arc-minutes
(i.e., ``"05m"``).
registration
Grid registration type. Either ``"pixel"`` for pixel registration or
``"gridline"`` for gridline registration.
Expand Down