home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 154818715 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • shoyer 2
  • max-sixty 1

issue 1

  • Dataset constructor fails if values are objects · 3 ✖

author_association 1

  • MEMBER 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
219529589 https://github.com/pydata/xarray/issues/847#issuecomment-219529589 https://api.github.com/repos/pydata/xarray/issues/847 MDEyOklzc3VlQ29tbWVudDIxOTUyOTU4OQ== shoyer 1217238 2016-05-16T19:58:29Z 2016-05-16T19:58:29Z MEMBER

What do you think about the reverse approach - checking for a list of known array types, and everything else becomes a scalar?

Sure, we could probably make this work

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset constructor fails if values are objects 154818715
219527492 https://github.com/pydata/xarray/issues/847#issuecomment-219527492 https://api.github.com/repos/pydata/xarray/issues/847 MDEyOklzc3VlQ29tbWVudDIxOTUyNzQ5Mg== max-sixty 5635139 2016-05-16T19:50:26Z 2016-05-16T19:50:26Z MEMBER

There are other ways to do this other than checking against a white-list of scalar types, but we can't take the obvious approach of converting everything into a numpy array and then checking the dimensionality because this can't be done safely for some types (e.g., dask.array).

What do you think about the reverse approach - checking for a list of known array types, and everything else becomes a scalar?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset constructor fails if values are objects 154818715
219466037 https://github.com/pydata/xarray/issues/847#issuecomment-219466037 https://api.github.com/repos/pydata/xarray/issues/847 MDEyOklzc3VlQ29tbWVudDIxOTQ2NjAzNw== shoyer 1217238 2016-05-16T16:04:21Z 2016-05-16T16:04:21Z MEMBER

You can put anything you want in a Dataset if you provide dimensions explicitly:

``` In [1]: import xarray as xr

In [2]: class Foo: ...: pass ...:

In [3]: xr.Dataset({'foo': ([], Foo())}) Out[3]: <xarray.Dataset> Dimensions: () Coordinates: empty Data variables: foo object <main.Foo object at 0x10824cba8> ```

The problem is that we need some rule to detect the dimensionality of input values, to know if we can treat them as a scalar or if we should raise an error. There are other ways to do this other than checking against a white-list of scalar types, but we can't take the obvious approach of converting everything into a numpy array and then checking the dimensionality because this can't be done safely for some types (e.g., dask.array).

I'm certainly open to ideas on how to improve this. At the very least, we should certainly improve the error message -- the error about mis-matched dimensions arises because we assume that anything that isn't a scalar but that is used as a key in the data_vars dict is a 1D coordinate variable along a dimension.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset constructor fails if values are objects 154818715

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 14.835ms · About: xarray-datasette