Skip to content

Commit

Permalink
Update type annotation for
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvothecoder committed Mar 21, 2024
1 parent 1002e6b commit 27bb88b
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions xcdat/regridder/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,21 +435,24 @@ def create_zonal_grid(grid: xr.Dataset) -> xr.Dataset:


def create_grid(
x: xr.DataArray | Tuple[xr.DataArray, Optional[xr.DataArray]] | None = None,
y: xr.DataArray | Tuple[xr.DataArray, Optional[xr.DataArray]] | None = None,
z: xr.DataArray | Tuple[xr.DataArray, Optional[xr.DataArray]] | None = None,
x: xr.DataArray | Tuple[xr.DataArray, xr.DataArray | None] | None = None,
y: xr.DataArray | Tuple[xr.DataArray, xr.DataArray | None] | None = None,
z: xr.DataArray | Tuple[xr.DataArray, xr.DataArray | None] | None = None,
attrs: Optional[Dict[str, str]] = None,
) -> xr.Dataset:
"""Creates a grid dataset using the specified axes.
Parameters
----------
x : xr.DataArray | Tuple[xr.DataArray, Optional[xr.DataArray]] | None
Data with optional bounds to use for the "X" axis, by default None.
y : xr.DataArray | Tuple[xr.DataArray, Optional[xr.DataArray]] | None
Data with optional bounds to use for the "Y" axis, by default None.
z : xr.DataArray | Tuple[xr.DataArray, Optional[xr.DataArray]] | None
Data with optional bounds to use for the "Z" axis, by default None.
x : xr.DataArray | Tuple[xr.DataArray, xr.DataArray | None] | None
An optional dataarray or tuple of a datarray with optional bounds to use
for the "X" axis, by default None.
y : xr.DataArray | Tuple[xr.DataArray, xr.DataArray | None] | None = None,
An optional dataarray or tuple of a datarray with optional bounds to use
for the "Y" axis, by default None.
z : xr.DataArray | Tuple[xr.DataArray, xr.DataArray | None] | None
An optional dataarray or tuple of a datarray with optional bounds to use
for the "Z" axis, by default None.
attrs : Optional[Dict[str, str]]
Custom attributes to be added to the generated `xr.Dataset`.
Expand Down

0 comments on commit 27bb88b

Please sign in to comment.