home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "MEMBER", issue = 201617371 and user = 10050469 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

  • fmaussion · 2 ✖

issue 1

  • Using where() in datasets with dataarrays with different dimensions results in huge RAM consumption · 2 ✖

author_association 1

  • MEMBER · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
273544152 https://github.com/pydata/xarray/issues/1217#issuecomment-273544152 https://api.github.com/repos/pydata/xarray/issues/1217 MDEyOklzc3VlQ29tbWVudDI3MzU0NDE1Mg== fmaussion 10050469 2017-01-18T17:34:13Z 2017-01-18T17:34:13Z MEMBER

. So in my case extracting the data with the shared dimension using ds.drop() is appropriate. It would be nice to have xarray throw a warning or error to prevent me chomping up all the RAM in my system if I do try to do this sort of thing though.

I'll let @shoyer give a definitive answer here, but I don't think that .where is meant to check whether the input makes "sense" or not. What happens is related to how xarray chooses to broadcast non matching dimensions:

```python import xarray as xr import numpy as np d1 = xr.DataArray(np.arange(3), coords={'t1': np.linspace(0, 1, 3)}, dims='t1') d2 = xr.DataArray(np.arange(4), coords={'t2': np.linspace(0, 1, 4)}, dims='t2')

d2 * d1 <xarray.DataArray (t2: 4, t1: 3)> array([[0, 0, 0], [0, 1, 2], [0, 2, 4], [0, 3, 6]]) Coordinates: * t2 (t2) float64 0.0 0.3333 0.6667 1.0 * t1 (t1) float64 0.0 0.5 1.0

d2.where(d1 == 1) <xarray.DataArray (t2: 4, t1: 3)> array([[ nan, 0., nan], [ nan, 1., nan], [ nan, 2., nan], [ nan, 3., nan]]) Coordinates: * t2 (t2) float64 0.0 0.3333 0.6667 1.0 * t1 (t1) float64 0.0 0.5 1.0 ``` which "makes sense", but is going to have a huge memory consumption if your arrays are large.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Using where() in datasets with dataarrays with different dimensions results in huge RAM consumption 201617371
273520435 https://github.com/pydata/xarray/issues/1217#issuecomment-273520435 https://api.github.com/repos/pydata/xarray/issues/1217 MDEyOklzc3VlQ29tbWVudDI3MzUyMDQzNQ== fmaussion 10050469 2017-01-18T16:14:19Z 2017-01-18T16:14:19Z MEMBER

Thanks for the report! It would be great if you could be a bit more specific: - if data1 and data2 are unrelated, why do you want to apply where on both variables? What is your expectation on the output? - do you have the possibility to produce a minimal, self-contained working example?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Using where() in datasets with dataarrays with different dimensions results in huge RAM consumption 201617371

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