issues: 344631360
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
344631360 | MDU6SXNzdWUzNDQ2MzEzNjA= | 2315 | Behavior of filter_by_attrs() does not match netCDF4.Dataset.get_variables_by_attributes | 868027 | closed | 0 | 8 | 2018-07-25T22:35:14Z | 2018-08-28T01:21:20Z | 2018-08-28T01:21:20Z | CONTRIBUTOR | When using the Minimal Example
Example Output
Expected Output
Alternatively, chaining calls to filter_by_attrs will result in the expected behavior: ```python import xarray as xr example_dataset = xr.Dataset({ "var1": xr.DataArray([], attrs={"standard_name": "example1", "priority": 0}), "var2": xr.DataArray([], attrs={"standard_name": "example2"}) }) example_dataset.filter_by_attrs(standard_name="example2").filter_by_attrs(priority=0) <xarray.Dataset> Dimensions: () Data variables: empty ``` Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2315/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |