home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 821939594

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/pull/5089#issuecomment-821939594 https://api.github.com/repos/pydata/xarray/issues/5089 821939594 MDEyOklzc3VlQ29tbWVudDgyMTkzOTU5NA== 1217238 2021-04-18T05:58:49Z 2021-04-18T05:58:49Z MEMBER

This looks great, but I wonder if we could simplify the implementation? For example, could we get away with only doing a single isel() for selecting the positions corresponding to unique values, rather than the current loop? .stack() can also be expensive relative to indexing.

This might require using a different routine to find the unique positions the current calls to duplicated() on a pandas.Index. I think we could construct the necessary indices even for multi-dimensional arrays using np.unique with return_index=True and np.unravel_index.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  842940980
Powered by Datasette · Queries took 0.692ms · About: xarray-datasette