pull_requests: 993569436
This data as json
id | node_id | number | state | locked | title | user | body | created_at | updated_at | closed_at | merged_at | merge_commit_sha | assignee | milestone | draft | head | base | author_association | auto_merge | repo | url | merged_by |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
993569436 | PR_kwDOAMm_X847OKqc | 6774 | closed | 0 | Make the `sel` error more descriptive when `method` is unset | 4806877 | - [x] Tests added This came up in the tutorial and I was wondering if the error could be made a little clearer. Not sure if the error message should hint that a user might want to use ``method``. ```python import numpy as np import pandas as pd import xarray as xr arr = xr.DataArray( data=np.arange(48).reshape(4, 2, 6), dims=("u", "v", "time"), coords={ "u": [-3.2, 2.1, 5.3, 6.5], "v": [-1, 2.6], "time": pd.date_range("2009-01-05", periods=6, freq="M"), }, ) arr.sel(u=5, time="2009-04-28") # I removed `method="nearest"` ``` Before this PR: ```python-traceback ... KeyError: 5.0 ``` After this PR: ```python-traceback ... KeyError: "not all values found in index 'u'. Did you mean to set `method=`?" ``` | 2022-07-11T21:17:07Z | 2022-07-13T14:49:24Z | 2022-07-12T20:33:00Z | 2022-07-12T20:33:00Z | 4aae7fd0c39d4462d745dffc6c1eb880a5efa973 | 0 | ecc3683ac13469301b6bccb4b7eb580b9fc464d7 | 7cc6cc991e586a6158bb656b8001234ccda25407 | CONTRIBUTOR | 13221727 | https://github.com/pydata/xarray/pull/6774 |
Links from other tables
- 0 rows from pull_requests_id in labels_pull_requests