home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where issue = 1052740367 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 6

  • mathause 3
  • dcherian 2
  • max-sixty 2
  • Illviljan 1
  • keewis 1
  • FabianHofmann 1

author_association 2

  • MEMBER 9
  • CONTRIBUTOR 1

issue 1

  • preserve chunked data when creating DataArray from DataArray · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1012384997 https://github.com/pydata/xarray/pull/5984#issuecomment-1012384997 https://api.github.com/repos/pydata/xarray/issues/5984 IC_kwDOAMm_X848V8Tl FabianHofmann 19226431 2022-01-13T18:10:57Z 2022-01-13T18:10:57Z CONTRIBUTOR

It was a pleasure!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from DataArray 1052740367
1012330030 https://github.com/pydata/xarray/pull/5984#issuecomment-1012330030 https://api.github.com/repos/pydata/xarray/issues/5984 IC_kwDOAMm_X848Vu4u Illviljan 14371165 2022-01-13T17:03:07Z 2022-01-13T17:03:07Z MEMBER

Thank you, @FabianHofmann !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from DataArray 1052740367
983858467 https://github.com/pydata/xarray/pull/5984#issuecomment-983858467 https://api.github.com/repos/pydata/xarray/issues/5984 IC_kwDOAMm_X846pH0j dcherian 2448579 2021-12-01T17:19:12Z 2021-12-01T17:19:12Z MEMBER

(Just for completeness - xr.DataArray(da, **kwargs) does a good job at erroring if the kwargs are not compatible with da.)

Sounds good to me then!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from DataArray 1052740367
983747745 https://github.com/pydata/xarray/pull/5984#issuecomment-983747745 https://api.github.com/repos/pydata/xarray/issues/5984 IC_kwDOAMm_X846osyh mathause 10194086 2021-12-01T15:22:27Z 2021-12-01T15:22:27Z MEMBER

Any objections to merging this as is? If we don't disallow xr.DataArray(da) this is a clear advantage over the current version.

However,

```python xr.DataArray(da).data is da.data # True xr.DataArray(da.data).data is da.data # True

while

da.copy().data is da.data # False (deep=True is the default) ``` might just be surprising in some situations.

(Just for completeness - xr.DataArray(da, **kwargs) does a good job at erroring if the kwargs are not compatible with da.)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from DataArray 1052740367
979413036 https://github.com/pydata/xarray/pull/5984#issuecomment-979413036 https://api.github.com/repos/pydata/xarray/issues/5984 IC_kwDOAMm_X846YKgs max-sixty 5635139 2021-11-25T18:24:04Z 2021-11-25T18:24:04Z MEMBER

In contrast to that, I think we can keep xr.DataArray(da) working, but only if it's the only argument (i.e. I don't think we should allow xr.DataArray(da, dims=("x", "y")) or something similar – those might still be useful, but I'd make them separate methods instead of overloading the constructor).

Perfect, very much agree, thank you for the clear description @keewis !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from DataArray 1052740367
979283695 https://github.com/pydata/xarray/pull/5984#issuecomment-979283695 https://api.github.com/repos/pydata/xarray/issues/5984 IC_kwDOAMm_X846Xq7v keewis 14808389 2021-11-25T15:00:59Z 2021-11-25T15:00:59Z MEMBER

for reference, the situation we already deprecated and removed was passing (["x", "y"], da) to as_variable (for example, when passed to the coords parameter of DataArray), which would create a new variable with new dimension names, but drop the old attrs and the name / coords and it would convert var to numpy, which could trigger a computation if the data was a dask array (or raise / emit a warning for other array types).

In contrast to that, I think we can keep xr.DataArray(da) working, but only if it's the only argument (i.e. I don't think we should allow xr.DataArray(da, dims=("x", "y")) or something similar – those might still be useful, but I'd make them separate methods instead of overloading the constructor).

However, this might make the constructor a bit more difficult to understand so if we don't think that's worth the (minor) inconvenience: python da if isinstance(da, xr.DataArray) else xr.DataArray(da) we can go ahead with the deprecation.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from DataArray 1052740367
979262832 https://github.com/pydata/xarray/pull/5984#issuecomment-979262832 https://api.github.com/repos/pydata/xarray/issues/5984 IC_kwDOAMm_X846Xl1w max-sixty 5635139 2021-11-25T14:31:53Z 2021-11-25T14:31:53Z MEMBER

How about we raise DeprecationWarning for now asking the user to pass in .data instead.

Does this mean xr.DataArray(da) would be deprecated? That seems like a very common case. Sorry for joining late but could I ask why this is necessary, if my assumption is right? I had been thinking that is broadly equivalent to a copy.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from DataArray 1052740367
979096277 https://github.com/pydata/xarray/pull/5984#issuecomment-979096277 https://api.github.com/repos/pydata/xarray/issues/5984 IC_kwDOAMm_X846W9LV mathause 10194086 2021-11-25T11:02:18Z 2021-11-25T11:02:18Z MEMBER

How about we raise DeprecationWarning for now asking the user to pass in .data instead.

Makes sense - how about:

python msg = ( "Passing a `DataArray` object to the `DataArray` constructor is ambiguous.\n" "Pass `da.data`, or use `da.copy(deep=True)`, or one of the `xarray.*_like` (e.g. " "`xarray.zeros_like`) functions instead,\n" "depending on your use case." ) warnings.warn(msg, FutureWarning)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from DataArray 1052740367
978014946 https://github.com/pydata/xarray/pull/5984#issuecomment-978014946 https://api.github.com/repos/pydata/xarray/issues/5984 IC_kwDOAMm_X846S1Li dcherian 2448579 2021-11-24T16:04:01Z 2021-11-24T16:04:01Z MEMBER

How about we raise DeprecationWarning for now asking the user to pass in .data instead.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from DataArray 1052740367
977689446 https://github.com/pydata/xarray/pull/5984#issuecomment-977689446 https://api.github.com/repos/pydata/xarray/issues/5984 IC_kwDOAMm_X846Rltm mathause 10194086 2021-11-24T09:23:14Z 2021-11-24T09:23:14Z MEMBER

@dcherian you had an opinion on this in #5983 - would you rather raise a ValueError here and advise to pass da.data?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  preserve chunked data when creating DataArray from DataArray 1052740367

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