home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 112254767 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • shoyer 2
  • jhamman 1
  • max-sixty 1
  • markelg 1

author_association 2

  • MEMBER 4
  • CONTRIBUTOR 1

issue 1

  • Confusing error (or lack thereof) when coordinate and variable share the same name · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
484934985 https://github.com/pydata/xarray/issues/631#issuecomment-484934985 https://api.github.com/repos/pydata/xarray/issues/631 MDEyOklzc3VlQ29tbWVudDQ4NDkzNDk4NQ== max-sixty 5635139 2019-04-19T15:39:54Z 2019-04-19T15:39:54Z MEMBER

Adding a v confusing error message which my colleague just hit (not exactly the same as this, but thought it wasn't worth a whole new issue):

```

In [10]: xr.DataArray( ...: data=1, ...: coords={ ...: 'test':[1]#, ...: }, ...: dims=['test'] ...: )


KeyError Traceback (most recent call last) <ipython-input-10-41a019d49aae> in <module> 4 'test':[1]#, 5 }, ----> 6 dims=['test'] 7 )

~/workspace/xarray/xarray/core/dataarray.py in init(self, data, coords, dims, name, attrs, encoding, indexes, fastpath) 228 229 data = as_compatible_data(data) --> 230 coords, dims = _infer_coords_and_dims(data.shape, coords, dims) 231 variable = Variable(dims, data, attrs, encoding, fastpath=True) 232

~/workspace/xarray/xarray/core/dataarray.py in _infer_coords_and_dims(shape, coords, dims) 76 77 for d, s in zip(v.dims, v.shape): ---> 78 if s != sizes[d]: 79 raise ValueError('conflicting sizes for dimension %r: ' 80 'length %s on the data but length %s on '

KeyError: 'test' ```

...nothing to do with the test entry, it's that data is a scalar

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Confusing error (or lack thereof) when coordinate and variable share the same name 112254767
327726641 https://github.com/pydata/xarray/issues/631#issuecomment-327726641 https://api.github.com/repos/pydata/xarray/issues/631 MDEyOklzc3VlQ29tbWVudDMyNzcyNjY0MQ== jhamman 2443309 2017-09-07T08:19:57Z 2017-09-07T08:19:57Z MEMBER

The first example here was fixed in #1539.

The second issue still exists but now requires dims to be specified explicitly.

Python In [9]: Dataset({"a": DataArray(np.zeros(3), dims='a', coords={"a": list("xyz")})}) ...: ...: Out[9]: <xarray.Dataset> Dimensions: (a: 3) Coordinates: * a (a) float64 0.0 0.0 0.0 Data variables: *empty*

Do we agree it is safe to say that no key should be repeated between data and coords?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Confusing error (or lack thereof) when coordinate and variable share the same name 112254767
149632771 https://github.com/pydata/xarray/issues/631#issuecomment-149632771 https://api.github.com/repos/pydata/xarray/issues/631 MDEyOklzc3VlQ29tbWVudDE0OTYzMjc3MQ== shoyer 1217238 2015-10-20T16:59:23Z 2015-10-20T16:59:23Z MEMBER

Yes, @markelg I think you describe each of these issues correctly. They should each result in more informative errors.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Confusing error (or lack thereof) when coordinate and variable share the same name 112254767
149458659 https://github.com/pydata/xarray/issues/631#issuecomment-149458659 https://api.github.com/repos/pydata/xarray/issues/631 MDEyOklzc3VlQ29tbWVudDE0OTQ1ODY1OQ== markelg 6883049 2015-10-20T07:15:20Z 2015-10-20T07:15:20Z CONTRIBUTOR

This is related to #457. In the first case, I think that the error message must be improved, but I do not think that Error is itself is a bug. From the netCDF data model point of view, it does not make sense to define a two dimensional variable sharing the name with a one-dimensional coordinate.

The second example does look like a bug, as it should raise an error too, in my opinion, as the function Dataset is given contradictory information (two different sets of values for the same variable "a"). In netCDF files you cannot have two variables with the same name, and coordinate variables are just regular variables.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Confusing error (or lack thereof) when coordinate and variable share the same name 112254767
149386132 https://github.com/pydata/xarray/issues/631#issuecomment-149386132 https://api.github.com/repos/pydata/xarray/issues/631 MDEyOklzc3VlQ29tbWVudDE0OTM4NjEzMg== shoyer 1217238 2015-10-20T00:39:53Z 2015-10-20T00:39:53Z MEMBER

Oh my, this certainly does look like a bug (or several).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Confusing error (or lack thereof) when coordinate and variable share the same name 112254767

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