diff --git a/pygmt/src/filter1d.py b/pygmt/src/filter1d.py index 4bd0cdf8344..3bb08cf6ff2 100644 --- a/pygmt/src/filter1d.py +++ b/pygmt/src/filter1d.py @@ -4,8 +4,8 @@ from typing import Literal +import numpy as np import pandas as pd -import xarray as xr from pygmt.clib import Session from pygmt.exceptions import GMTInvalidInput from pygmt.helpers import ( @@ -27,7 +27,7 @@ def filter1d( output_type: Literal["pandas", "numpy", "file"] = "pandas", outfile: str | None = None, **kwargs, -) -> pd.DataFrame | xr.DataArray | None: +) -> pd.DataFrame | np.ndarray | None: r""" Time domain filtering of 1-D data tables. diff --git a/pygmt/src/grd2xyz.py b/pygmt/src/grd2xyz.py index 17cfcb246bc..ea1c52cb224 100644 --- a/pygmt/src/grd2xyz.py +++ b/pygmt/src/grd2xyz.py @@ -4,6 +4,7 @@ from typing import TYPE_CHECKING, Literal +import numpy as np import pandas as pd import xarray as xr from pygmt.clib import Session @@ -42,7 +43,7 @@ def grd2xyz( output_type: Literal["pandas", "numpy", "file"] = "pandas", outfile: str | None = None, **kwargs, -) -> pd.DataFrame | xr.DataArray | None: +) -> pd.DataFrame | np.ndarray | None: r""" Convert grid to data table.