-
-
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
Datatree alignment docs #9501
base: main
Are you sure you want to change the base?
Datatree alignment docs #9501
Conversation
@@ -800,6 +800,7 @@ included by default unless you exclude them with the ``inherited`` flag: | |||
|
|||
dt2["/weather/temperature"].to_dataset(inherited=False) | |||
|
|||
For more examples and further discussion see LINK |
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 want to use this link but I can't seem to get it to work properly
:ref:`Alignment and Coordinate Inheritance <userguide.hierarchical-data.alignment-and-coordinate-inheritance>
Data Alignment | ||
~~~~~~~~~~~~~~ | ||
|
||
The data in different datatree nodes are not totally independent. In particular dimensions (and indexes) in child nodes must be aligned (LINK HERE) with those in their parent nodes. |
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.
This is where I would like to link to some generic documentation on what alignment is, but it doesn't really exist, see #9500.
ds_weekly.sizes | ||
ds_monthly.sizes | ||
|
||
We cannot store these non-alignable variables on a single :py:class:`~xarray.Dataset` object, because they do not exactly align: |
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 guess it would be more correct to say that we cannot store them unchanged.
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.
As someone who doesn't use DataTree yet, this is v nice & clear!
…las/xarray into datatree_alignment_docs
Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
…las/xarray into datatree_alignment_docs
Co-authored-by: Stephan Hoyer <shoyer@google.com>
Data Alignment | ||
~~~~~~~~~~~~~~ |
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.
TODO: add comment about open_groups
being useful if your data doesn't align
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.
this is the only note I have on open_groups, it probably deserves more. https://github.com/pydata/xarray/blob/main/doc/getting-started-guide/quick-overview.rst?plain=1#L284
Adds a dedicated section on datatree alignment and coordinate inheritance to the Hierarchical Data page. Intended to complement what's already been added to the Data Structures page by @flamingbear, in a more narrative form. I've also tried to separate out the concept of alignment from coordinate inheritance.
This shouldn't really be merged until a few other things are fixed, particularly #9499.
Tests addedUser visible changes (including notable bug fixes) are documented inwhats-new.rst
New functions/methods are listed inapi.rst
cc @shoyer @eni-awowale @owenlittlejohns