-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve to_zarr doc about chunking #4048
Conversation
xarray/core/dataset.py
Outdated
zarr may automatically chunk a DataArray if it is not chunked or | ||
if `chunks` is not set to -1 in its `enconding` attribute or in the | ||
argument of the `encoding` parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we instead state what does happen if a variable is already chunked or chunks
can be found in encoding
?
Something like
- If
chunks
are found in theencoding
argument or attribute corresponding to any DataArray, those chunks are used. - Otherwise, if the DataArray is already a dask array, it is written with those chunks.
- Finally, if not other chunks are found, Zarr uses its own heuristics to choose automatic chunk sizes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I closely followed your suggestion.
Note that I am not sure about the docstring style for a list-like note like this one.
if anybody has a clue on how to fix tests this would be welcome. |
There are two sphinx warnings in building the docs
These seem related to your changes. I would try to get the docs building locally without any warnings. |
the |
ok, tests are passing. |
argh ... I was unfortunately not able to create a proper list without breaking tests and have exhausted my time trying to figure it out. |
I think it's OK that it's not formatted as a list. It's still pretty readable |
thanks @apatlpo ! |
isort -rc . && black . && mypy . && flake8
I'm not sure the last point is really necessary for this PR, is it?