html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/2227#issuecomment-396675613,https://api.github.com/repos/pydata/xarray/issues/2227,396675613,MDEyOklzc3VlQ29tbWVudDM5NjY3NTYxMw==,1197350,2018-06-12T17:45:48Z,2018-06-12T17:45:48Z,MEMBER,"Another part of the matrix of possibilities. Takes about half the time if you pass `time_filter.values` (numpy array) rather than the `time_filter` DataArray: ```python %timeit ds.a.isel(time=time_filter.values) 1.3 s ± 67.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) ```","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,331668890 https://github.com/pydata/xarray/issues/2227#issuecomment-396660606,https://api.github.com/repos/pydata/xarray/issues/2227,396660606,MDEyOklzc3VlQ29tbWVudDM5NjY2MDYwNg==,1197350,2018-06-12T16:55:55Z,2018-06-12T16:55:55Z,MEMBER,"I don't have experience using `isel` with boolean indexing. (Although the docs on [positional indexing](http://xarray.pydata.org/en/latest/indexing.html#positional-indexing) claim it is supported.) My guess is that that the time is being spent aligning the indexer with the array, which is unnecessary since you know they are already aligned. Probably not the most efficient pattern for xarray. Here's how I would recommend writing the query using label-based selection: ```python %timeit ds.a.sel(time=slice(50_001, None)) 117 ms ± 5.29 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) ``` ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,331668890