Skip to content

Commit

Permalink
fix type hint for python3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchin committed Jan 20, 2025
1 parent 2d24330 commit a1a6de2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gplately/grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import math
import warnings
from multiprocessing import cpu_count
from typing import Union
from typing import Union, Tuple

import matplotlib.colors
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -167,7 +167,9 @@ def read_netcdf_grid(
x_dimension_name: str = "",
y_dimension_name: str = "",
data_variable_name: str = "",
) -> tuple[np.ma.MaskedArray, np.ma.MaskedArray, np.ma.MaskedArray] | np.ma.MaskedArray:
) -> Union[
Tuple[np.ma.MaskedArray, np.ma.MaskedArray, np.ma.MaskedArray], np.ma.MaskedArray
]:
"""Read a `netCDF` (.nc) grid from a given `filename` and return its data as a
`MaskedArray`.
Expand Down

0 comments on commit a1a6de2

Please sign in to comment.