home / github / pull_requests

Menu
  • Search all tables
  • GraphQL API

pull_requests: 1479306486

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
1479306486 PR_kwDOAMm_X85YLGz2 8079 closed 0 Consistently report all dimensions in error messages if invalid dimensions are given 20118130 Hello, I noticed that `arr.min("nonexistent")` raises an error with a very helpful message ``` ValueError: 'nonexistent' not found in array dimensions ('x', 'y', 'z') ``` while `arr.idxmin("nonexistent")` raises ``` KeyError: 'Dimension "nonexistent" not in dimension' [sic] ``` IMO, the list of dimensions should always be shown in the error message for these kinds of errors, it makes debugging much easier. With this PR, I have implemented this behavior for all such functions that I could find. There is quite a consistent pattern which I think could be factored out into a function, but I didn't have a clear enough picture of the structure of the whole code to do it. I didn't fix the tests yet, I'll do it if you think this can be merged. - [x] Searched list of issues, couldn't find one related to this - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` 2023-08-17T16:03:53Z 2023-09-09T04:55:43Z 2023-09-09T04:55:43Z 2023-09-09T04:55:43Z 0afbd45bdc52d34fae4cdb6d1d67b468dd7cd4fc     0 5b6ebd2cebf80dbcbbf149a66fdecaed23ac9c4a 67268f1159fc5b4aee5c644b37d84036d8fc1528 CONTRIBUTOR   13221727 https://github.com/pydata/xarray/pull/8079  

Links from other tables

  • 4 rows from pull_requests_id in labels_pull_requests
Powered by Datasette · Queries took 0.77ms