Skip to content

Commit 81dae43

Browse files
authored
Merge pull request #84 from chrishavlin/chunksizes_docstring_entry
add chunksizes to load_grid docstring
2 parents 6d8fdc6 + 4818c12 commit 81dae43

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

yt_xarray/accessor/accessor.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import numpy as np
55
import xarray as xr
66
import yt
7+
from numpy.typing import ArrayLike
78
from unyt import unyt_quantity
89

910
from yt_xarray.accessor import _xr_to_yt
@@ -37,7 +38,7 @@ def load_grid(
3738
use_callable: bool = True,
3839
sel_dict: Optional[dict] = None,
3940
sel_dict_type: Optional[str] = "isel",
40-
chunksizes: Optional[int] = None,
41+
chunksizes: Optional[Union[int, ArrayLike]] = None,
4142
**kwargs,
4243
):
4344
"""
@@ -64,6 +65,11 @@ def load_grid(
6465
either "isel" (default) or "sel" to indicate index or value selection for
6566
sel_dict.
6667
68+
chunksizes: int or ArrayLike
69+
if set, will decompose the grid into multiple grids with grid dimensions
70+
of chunksizes. Can be a single integer (same chunksize in each dimensions)
71+
or an ArrayLike object of the same length as the number of dimensions.
72+
6773
kwargs :
6874
any additional keyword arguments to pass to yt.load_uniform_grid
6975

0 commit comments

Comments
 (0)