-
-
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
Fix kwargs used for extrapolation in docs #6639
Conversation
The current version of xarray tries to call scipy's interp1d whenever possible, and kwargs used in the user guide should reflect this. Fixes pydata#6617
for more information, see https://pre-commit.ci
I wonder if the docstrings can be improved or do you think the docstrings for |
Right now, the docstring only suggests different interpolation may be used depending on the input, but typically refers to "1-dimensional" vs "multi-dimensional" arrays.
Does that look alright to you? |
Sounds good to me! |
The extended summaries for Dataset.interp and DataArray.interp explain how the scipy interpolator is selected
Explains how the scipy interpolator is chosen, similarly as done in Dataset.interp and DataArray.interp
When scipy.interpolate.interp1d is called, it is possible to interpolate with the polynomial method if the `order` kwarg is provided.
Hopefully this looks better: it now states that |
@pums974 You maybe have an opinion on the accuracy of this PR, since you originally implemented this behavior? |
@DoktorScience could you merge main and fix the conflicts? I think we can merge this afterwards. |
…docs Fixes merge with pydata#6637
Thank you for the heads-up @Illviljan. Should be good now |
Yep this look good to me too. |
Thanks @DoktorScience and @pums974 ! |
Merged, thanks @DoktorScience ! |
* main: (95 commits) Use `zarr` to validate attrs when writing to zarr (pydata#6636) Add pre-commit hook to check CITATION.cff (pydata#6658) Fix kwargs used for extrapolation in docs (pydata#6639) Fix notebooks' HTML links (pydata#6655) Doc index update (pydata#6530) CFTime support for polyval (pydata#6624) Support dask arrays in datetime_to_numeric (pydata#6556) [pre-commit.ci] pre-commit autoupdate (pydata#6654) 0-padded month. (pydata#6653) [test-upstream] import `cleanup` fixture from `distributed` (pydata#6650) Allow all interp methods in typing (pydata#6647) Typing support for custom backends (pydata#6651) Improved DataArray typing (pydata#6637) Adjust code comments & types from pydata#6638 (pydata#6642) Typing of `str` and `dt` accessors (pydata#6641) Feature/to dict encoding (pydata#6635) fix {full,zeros,ones}_like overloads (pydata#6630) Mypy badge (pydata#6626) concatenate docs style (pydata#6621) Typing for open_dataset/array/mfdataset and to_netcdf/zarr (pydata#6612) ...
The current version of xarray tries to call scipy's interp1d whenever
possible, and kwargs used in the user guide should reflect this.
Closes #6617