home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where author_association = "CONTRIBUTOR" and issue = 112253425 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

  • anntzer 6

issue 1

  • Whether a DataArray is copied when inserted into a Dataset depends on whether coordinates match exactly · 6 ✖

author_association 1

  • CONTRIBUTOR · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
458897417 https://github.com/pydata/xarray/issues/630#issuecomment-458897417 https://api.github.com/repos/pydata/xarray/issues/630 MDEyOklzc3VlQ29tbWVudDQ1ODg5NzQxNw== anntzer 1322974 2019-01-30T10:42:17Z 2019-01-30T10:42:17Z CONTRIBUTOR

Looks like the implicit nan-filling behavior is not present anymore, which likely killed the issue?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Whether a DataArray is copied when inserted into a Dataset depends on whether coordinates match exactly 112253425
152269091 https://github.com/pydata/xarray/issues/630#issuecomment-152269091 https://api.github.com/repos/pydata/xarray/issues/630 MDEyOklzc3VlQ29tbWVudDE1MjI2OTA5MQ== anntzer 1322974 2015-10-29T18:07:54Z 2015-10-29T18:07:54Z CONTRIBUTOR

If you put arrays in a Dataset, you should not count on modifications to the arrays in the Dataset trickling back to the original arrays.

I think the most confusing part is that this the modifications will trickle down sometimes -- even though I'd prefer them to be always propagated, I would still mind much less if they were never propagated. At the end of the day it's not my call, feel free to close the issue if you want.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Whether a DataArray is copied when inserted into a Dataset depends on whether coordinates match exactly 112253425
152105174 https://github.com/pydata/xarray/issues/630#issuecomment-152105174 https://api.github.com/repos/pydata/xarray/issues/630 MDEyOklzc3VlQ29tbWVudDE1MjEwNTE3NA== anntzer 1322974 2015-10-29T07:49:23Z 2015-10-29T07:49:23Z CONTRIBUTOR

Sorry to raise the issue again but I just noticed that I had a couple of other places where I wrote quite naturally

d = DataArray(...) e = DataArray(...) ds = Dataset({"d": d, "e": e}) <work to initialize d and e>

which is equivalent to the form I was mentioning earlier (whether ds will actually get initialized properly depends on whether d and e have exactly matching coordinates).

To be honest I don't really understand what you mean by "Unfortunately, it's impossible to make such automatically aligned arrays views in general, because of numpy's memory model.": when the line ds = Dataset(...) gets executed, the ndarrays ds.d.values and ds.e.values either point to the old ndarrays d.values and e.values or to some newly created, coordinate-aligned ndarrays. If it is the latter, one can just modify d.values and e.values (as well as their coordinates systems) to point to the new ndarrays, right?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Whether a DataArray is copied when inserted into a Dataset depends on whether coordinates match exactly 112253425
150044109 https://github.com/pydata/xarray/issues/630#issuecomment-150044109 https://api.github.com/repos/pydata/xarray/issues/630 MDEyOklzc3VlQ29tbWVudDE1MDA0NDEwOQ== anntzer 1322974 2015-10-21T22:37:56Z 2015-10-21T22:37:56Z CONTRIBUTOR

Thinking about it again, I think there could just be a mention in the docs that the pattern

foo = dataset[key] = DataArray(...)

should be avoided and written as

dataset[key] = DataArray(...) foo = dataset[key]

That should be good enough?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Whether a DataArray is copied when inserted into a Dataset depends on whether coordinates match exactly 112253425
149990310 https://github.com/pydata/xarray/issues/630#issuecomment-149990310 https://api.github.com/repos/pydata/xarray/issues/630 MDEyOklzc3VlQ29tbWVudDE0OTk5MDMxMA== anntzer 1322974 2015-10-21T18:45:57Z 2015-10-21T18:45:57Z CONTRIBUTOR

"If you use the DataArray constructor instead of inserting an item in a Dataset, the array values will always be a view." Can you explain what you mean here? I am using the DataArray constructor and then inserting the item in the Dataset.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Whether a DataArray is copied when inserted into a Dataset depends on whether coordinates match exactly 112253425
149590758 https://github.com/pydata/xarray/issues/630#issuecomment-149590758 https://api.github.com/repos/pydata/xarray/issues/630 MDEyOklzc3VlQ29tbWVudDE0OTU5MDc1OA== anntzer 1322974 2015-10-20T14:49:55Z 2015-10-20T14:50:09Z CONTRIBUTOR

I was more expecting that if the coordinates are not already aligned, then the DataArray gets modified to point to the "larger" array (though of course there may be issues with other variables pointing to the same array, etc.).

I like the pattern

some_explicit_dict_name[some_explicit_entry_name] = tmpvar = np.array(...) <... work work work on initializing tmpvar, expecting to initialize some_explicit_dict_name[some_explicit_entry_name]>

(because the explicit name is a bit too long to work with and I make it immediately clear what tmpvar is used for), but xray's behavior makes this work (on DataArrays) only sometimes, with no warning that this could fail to update the array I care about.

Not sure what the best approach is. Perhaps

tmpvar = dataset.new_dataarray(*args_and_**kwargs_to_DataArray.__init__)

which would make sure that no one else is pointing to the internal array at that point?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Whether a DataArray is copied when inserted into a Dataset depends on whether coordinates match exactly 112253425

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