-
-
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 examples #7881
Docstring examples #7881
Conversation
xarray/core/dataset.py
Outdated
} | ||
) | ||
|
||
argmin_indices = dataset.argmin(dim='student') |
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 add text explaining this
Can also feed the resulting indexes back in to .isel
(that's why this argmin
method exists)
Might be good to think of other example datasets for which you would be really interested in the index.
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.
Thanks @harshitha1201 - some changes needed here still before we can merge this.
Co-authored-by: Tom Nicholas <thomas.nicholas@columbia.edu>
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.
Looks great! Thank you @harshitha1201 !
The two final (easy) things to do are:
- Merge recent changes from
main
into this branch (you can do that locally or by clicking the button on this PR), - Add a short note to
doc/whats-new.rst
describing what you changed. Just something like "Added examples to docstrings ofDataset.isel
,Dataset.argmin
..., by Harshitha Diddidge". You should copy the format of other entries in the whatsnew file, including the number of this pull request. Also you can format the names of the methods you changes like this:py:meth:`Dataset.isel`
Thanks @harshitha1201 Nice work! |
* main: Remove hue_style from plot1d docstring (pydata#7925) Add new what's new section (pydata#7986) Release summary for v2023.07.0 (pydata#7979) Improve explanation in example "Working with Multidimensional Coordinates" (pydata#7984) Fix typo in zarr.py (pydata#7983) Examples added to docstrings (pydata#7936) [pre-commit.ci] pre-commit autoupdate (pydata#7973) Skip broken tests on python 3.11 and windows (pydata#7972) Use another repository for upstream testing (pydata#7970) Move absolute path finder from open_mfdataset to own function (pydata#7968) ensure no forward slashes in names for HDF5-based backends (pydata#7953) Chunked array docs (pydata#7951) [pre-commit.ci] pre-commit autoupdate (pydata#7959) manually unshallow the repository on RTD (pydata#7961) Update minimum version of typing extensions in pre-commit (pydata#7960) Docstring examples (pydata#7881)
Added docstring examples to some string methods (#6793)
[ ]
Closes #xxxx[ ]Tests added
[ ]User visible changes (including notable bug fixes) are documented in whats-new.rst
[ ]
New functions/methods are listed in api.rst