issues: 253975242
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
253975242 | MDU6SXNzdWUyNTM5NzUyNDI= | 1537 | Boolean indexing 'by' xr.DataArray | 6815844 | closed | 0 | 5 | 2017-08-30T12:08:08Z | 2017-08-31T01:39:00Z | 2017-08-31T01:39:00Z | MEMBER | Boolean indexing for np.ndarray 'by' a boolean xr.DataArray behaves strange, ```python In [1]: import numpy as np ...: import xarray as xr ...: ...: ind = xr.DataArray([True, True, False], dims=['x']) ...: ind Out[1]: <xarray.DataArray (x: 3)> array([ True, True, False], dtype=bool) Dimensions without coordinates: x In [2]: np.arange(3)[ind.values] Out[2]: array([0, 1]) In [3]: np.arange(3)[ind] Out[3]: array([], shape=(0, 3), dtype=int64) ``` (This is numpy==1.13) numpy==1.11 behaves differently, ```python
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1537/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |