home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

2 rows where "created_at" is on date 2019-08-23 and user = 2448579 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 2

  • issue 1
  • pull 1

state 1

  • closed 2

repo 1

  • xarray 2
id node_id number title user state locked assignee milestone comments created_at updated_at ▲ closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
484270833 MDU6SXNzdWU0ODQyNzA4MzM= 3248 combine_by_coords fails with DataArrays dcherian 2448579 closed 0     11 2019-08-23T00:11:38Z 2021-07-02T21:34:36Z 2021-07-02T21:34:36Z MEMBER      

MCVE Code Sample

python da1 = xr.DataArray([1, 2, 3], dims='x', coords={'x': [0, 1, 2]}) da2 = xr.DataArray([3, 4, 5], dims='x', coords={'x': [2, 3, 4]}) xr.combine_by_coords([da1, da2])

```

ValueError Traceback (most recent call last) <ipython-input-133-d27216ba5688> in <module> 1 da1 = xr.DataArray([1, 2, 3], dims='x', coords={'x': [0, 1, 2]}) 2 da2 = xr.DataArray([3, 4, 5], dims='x', coords={'x': [2, 3, 4]}) ----> 3 xr.combine_by_coords([da1, da2])

~/work/python/xarray/xarray/core/combine.py in combine_by_coords(datasets, compat, data_vars, coords, fill_value, join) 619 compat=compat, 620 fill_value=fill_value, --> 621 join=join, 622 ) 623

~/work/python/xarray/xarray/core/merge.py in merge(objects, compat, join, fill_value) 588 ) 589 --> 590 obj = obj.to_dataset() if isinstance(obj, DataArray) else obj 591 dict_like_objects.append(obj) 592

~/work/python/xarray/xarray/core/dataarray.py in to_dataset(self, dim, name) 478 return self._to_dataset_split(dim) 479 else: --> 480 return self._to_dataset_whole(name) 481 482 @property

~/work/python/xarray/xarray/core/dataarray.py in _to_dataset_whole(self, name, shallow_copy) 426 if name is None: 427 raise ValueError( --> 428 "unable to convert unnamed DataArray to a " 429 "Dataset without providing an explicit name" 430 )

ValueError: unable to convert unnamed DataArray to a Dataset without providing an explicit name ```

To get what I want, I need xr.combine_by_coords([da1.to_dataset(name='a'), da2.to_dataset(name='a')]).a

I think the issue is that the code uses to_dataset instead of _to_temp_dataset

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3248/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
484639035 MDExOlB1bGxSZXF1ZXN0MzEwNDc1MzIy 3255 Sparse fixes for reindex dcherian 2448579 closed 0     2 2019-08-23T17:39:08Z 2019-08-27T00:00:48Z 2019-08-27T00:00:44Z MEMBER   0 pydata/xarray/pulls/3255
  • [x] Tests added
  • [x] Passes black . && mypy . && flake8
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3255/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 2237.998ms · About: xarray-datasette