home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where author_association = "CONTRIBUTOR" and issue = 266133430 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • seth-p 3

issue 1

  • DataArray.argsort should be deleted · 3 ✖

author_association 1

  • CONTRIBUTOR · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
545261919 https://github.com/pydata/xarray/issues/1635#issuecomment-545261919 https://api.github.com/repos/pydata/xarray/issues/1635 MDEyOklzc3VlQ29tbWVudDU0NTI2MTkxOQ== seth-p 7441788 2019-10-23T04:35:37Z 2019-10-23T04:35:37Z CONTRIBUTOR

I think this issue is still relevant.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.argsort should be deleted 266133430
337672616 https://github.com/pydata/xarray/issues/1635#issuecomment-337672616 https://api.github.com/repos/pydata/xarray/issues/1635 MDEyOklzc3VlQ29tbWVudDMzNzY3MjYxNg== seth-p 7441788 2017-10-18T17:48:28Z 2017-10-18T18:36:25Z CONTRIBUTOR

I'm not a fan of auto-flattening either, but that's what nd.argsort() does...

One option is to have DataArray.arg{min,max,sort}() all take an optional flag argument specifying whether to return integer indices or index labels. But I think my preference would be be to have six separate functions: DataArray.{idx,}arg{min,max,sort}() (or some such nomenclature that includes arg in all six functions).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.argsort should be deleted 266133430
337623613 https://github.com/pydata/xarray/issues/1635#issuecomment-337623613 https://api.github.com/repos/pydata/xarray/issues/1635 MDEyOklzc3VlQ29tbWVudDMzNzYyMzYxMw== seth-p 7441788 2017-10-18T15:08:57Z 2017-10-18T15:08:57Z CONTRIBUTOR

I think that makes sense, though I don't quite understand what would go in its place. Another possibility -- perhaps a bad one -- is to permute the values in the sorted dimension so that they match the resulting values (i.e. something like result.coords[dim] = np.take(da.coords[dim].values, result.values, axis=axis)).

Note that ndarray.argsort(axis=None) sorts the flattened array, so the returned DataArray should respect this

Alternative suggestion: have DataArray.argsort() return an ndarray filled with labels from the sorted dimension, i.e. something like: class DataArray: def argsort(self, **kwargs): # TODO: update kwargs['axis'] based 'axis' and 'dim', and remove 'dim' if kwargs['axis'] is None: kwargs['axis'] = -1 return self.stack(dim=self.dims).argsort(**kwargs) return np.take(self.coords[self.dims[kwargs['axis']].values, self.values.argsort(**kwargs))

BTW, I'm just thinking in terms of ndarrays. Someone more knowledgeable than me may want to consider how to make it work intelligently with dask.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.argsort should be deleted 266133430

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 637.44ms · About: xarray-datasette