home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 396660606

This data as json

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-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 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
Powered by Datasette · Queries took 0.745ms · About: xarray-datasette