-
-
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
Docstring and documentation improvement for the Dataset class #8973
Conversation
…arer. The example in the doc-string of the `Dataset` class prior to this commit uses an example array whose size is `2 x 2 x 3` with the first two dimensions labeled `"x"` and `"y"` and the final dimension labeled `"time"`. This was confusing due to the fact that `"x"` and `"y"` are just arbitrary names for these axes and that no reason is given for the data to be organized in a `2x2x3` array instead of a `2x2` matrix. This commit clarifies the example. See issue pydata#8970 for more information.
These changes to the documentation bring it into alignment with the changes to the `Dataset` doc-string committed previously. See issue pydata#8970 for more information.
Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient. |
Thanks! We do get an error in the doc build — For the doctests, you may be on a slightly older version of xarray which doesn't print sizes, so worth updating. If you want to update the output automatically I have a project https://github.com/max-sixty/pytest-accept which does this automatically! |
Thanks. That error does not make sense to me—I have not materially changed it from what currently exists in the docs here where the line is Anyway, assuming that the |
Great — if anyone has any thoughts, feel free to comment; otherwise let's merge. Thanks @noahbenson , nice improvement to a core part of the docs... |
Any other thoughts? There's some discussion in #8970. I think it's reasonable to merge tomorrow without other suggestions. Give this a 👎 for disagreement (which is welcome ofc) |
Thanks @noahbenson ! I think this was a v nice improvement, thanks for pushing through! |
The example in the doc-string of the
Dataset
class prior to this commit uses an example array whose size is2 x 2 x 3
with the first two dimensions labeled"x"
and"y"
and the final dimension labeled"time"
. This was confusing due to the fact that"x"
and"y"
are just arbitrary names for these axes and that no reason is given for the data to be organized in a2x2x3
array instead of a2x2
matrix. This commit clarifies the example.Additionally, this PR contains updates to the documentation, specifically the
user-guide/data-structures.rst
file; the updates bring the documentation examples into alignment with the doc-string change. Unfortunately, I wasn't able to build the documentation, so this will need to be checked. (I followed the instructions here, but despitecfgrib
working fine, I got an error about how it wasn't a valid engine.)See issue #8970 for more information.
Dataset
is not clear #8970