issues: 583220835
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
583220835 | MDU6SXNzdWU1ODMyMjA4MzU= | 3866 | Allow `isel` to ignore missing dimensions? | 3958036 | closed | 0 | 0 | 2020-03-17T18:41:13Z | 2020-04-03T19:47:08Z | 2020-04-03T19:47:08Z | CONTRIBUTOR | Sometimes it would be nice for ds.isel(t=0) # currently raises an exception ds.isel(t=0, ignore_missing=True) # would be nice if this was allowed, just returning ds ``` For example, when writing a function can be called on variables with different combinations of dimensions. I think it should be fairly easy to implement, just add the argument to the condition here https://github.com/pydata/xarray/blob/65a5bff79479c4b56d6f733236fe544b7f4120a8/xarray/core/variable.py#L1059-L1062 the only downside would be increased complexity of adding another argument to the API for an issue where a workaround is not hard (at least in the case I have at the moment), just a bit clumsy. |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3866/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |