home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 512205079 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • friedrichknuth 2
  • shoyer 1

author_association 2

  • NONE 2
  • MEMBER 1

issue 1

  • Merge fails when sparse Dataset has overlapping dimension values · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
551386159 https://github.com/pydata/xarray/issues/3445#issuecomment-551386159 https://api.github.com/repos/pydata/xarray/issues/3445 MDEyOklzc3VlQ29tbWVudDU1MTM4NjE1OQ== shoyer 1217238 2019-11-08T05:05:01Z 2019-11-08T05:05:01Z MEMBER

The missing operation here in sparse is indexing like x[y, z] where y and z are both arrays.

For reference, here's the traceback: ```


IndexError Traceback (most recent call last) <ipython-input-1-6547fa3d1500> in <module>() 17 'time':time}).to_dataset() 18 ---> 19 dataset1 = xr.merge([data_array1,data_array2])

9 frames /usr/local/lib/python3.6/dist-packages/xarray/core/merge.py in merge(objects, compat, join, fill_value) 780 dict_like_objects.append(obj) 781 --> 782 merge_result = merge_core(dict_like_objects, compat, join, fill_value=fill_value) 783 merged = Dataset._construct_direct(**merge_result._asdict()) 784 return merged

/usr/local/lib/python3.6/dist-packages/xarray/core/merge.py in merge_core(objects, compat, join, priority_arg, explicit_coords, indexes, fill_value) 537 coerced = coerce_pandas_values(objects) 538 aligned = deep_align( --> 539 coerced, join=join, copy=False, indexes=indexes, fill_value=fill_value 540 ) 541 collected = collect_variables_and_indexes(aligned)

/usr/local/lib/python3.6/dist-packages/xarray/core/alignment.py in deep_align(objects, join, copy, indexes, exclude, raise_on_invalid, fill_value) 403 indexes=indexes, 404 exclude=exclude, --> 405 fill_value=fill_value 406 ) 407

/usr/local/lib/python3.6/dist-packages/xarray/core/alignment.py in align(join, copy, indexes, exclude, fill_value, objects) 331 new_obj = obj.copy(deep=copy) 332 else: --> 333 new_obj = obj.reindex(copy=copy, fill_value=fill_value, *valid_indexers) 334 new_obj.encoding = obj.encoding 335 result.append(new_obj)

/usr/local/lib/python3.6/dist-packages/xarray/core/dataset.py in reindex(self, indexers, method, tolerance, copy, fill_value, **indexers_kwargs) 2430 tolerance, 2431 copy=copy, -> 2432 fill_value=fill_value, 2433 ) 2434 coord_names = set(self._coord_names)

/usr/local/lib/python3.6/dist-packages/xarray/core/alignment.py in reindex_variables(variables, sizes, indexes, indexers, method, tolerance, copy, fill_value) 581 582 if needs_masking: --> 583 new_var = var._getitem_with_mask(key, fill_value=fill_value) 584 elif all(is_full_slice(k) for k in key): 585 # no reindexing necessary

/usr/local/lib/python3.6/dist-packages/xarray/core/variable.py in _getitem_with_mask(self, key, fill_value) 724 actual_indexer = indexer 725 --> 726 data = as_indexable(self._data)[actual_indexer] 727 mask = indexing.create_mask(indexer, self.shape, data) 728 data = duck_array_ops.where(mask, fill_value, data)

/usr/local/lib/python3.6/dist-packages/xarray/core/indexing.py in getitem(self, key) 1260 def getitem(self, key): 1261 array, key = self._indexing_array_and_key(key) -> 1262 return array[key] 1263 1264 def setitem(self, key, value):

/usr/local/lib/python3.6/dist-packages/sparse/_coo/indexing.py in getitem(x, index) 66 67 # Get the mask ---> 68 mask, adv_idx = _mask(x.coords, index, x.shape) 69 70 # Get the length of the mask

/usr/local/lib/python3.6/dist-packages/sparse/_coo/indexing.py in _mask(coords, indices, shape) 129 if len(adv_idx) != 0: 130 if len(adv_idx) != 1: --> 131 raise IndexError('Only indices with at most one iterable index are supported.') 132 133 adv_idx = adv_idx[0]

IndexError: Only indices with at most one iterable index are supported. ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Merge fails when sparse Dataset has overlapping dimension values 512205079
551359502 https://github.com/pydata/xarray/issues/3445#issuecomment-551359502 https://api.github.com/repos/pydata/xarray/issues/3445 MDEyOklzc3VlQ29tbWVudDU1MTM1OTUwMg== friedrichknuth 10554254 2019-11-08T02:41:13Z 2019-11-08T02:41:13Z NONE

@El-minadero from the sparse API page I'm seeing two methods for combining data:

```python import sparse import numpy as np

A = sparse.COO.from_numpy(np.array([[1, 2], [3, 4]])) B = sparse.COO.from_numpy(np.array([[5, 9], [6, 8]])) sparse.stack([A,B]).todense()

Out[1]: array([[[1, 2], [3, 4]], [[5, 9], [6, 8]]])

sparse.concatenate([A,B]).todense()

Out[2]: array([[1, 2], [3, 4], [5, 9], [6, 8]]) `` Since this is an issue withsparse` and merging data doesn't seem to be supported at this time, you might consider closing this issue out here and raising it over at sparse.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Merge fails when sparse Dataset has overlapping dimension values 512205079
550516745 https://github.com/pydata/xarray/issues/3445#issuecomment-550516745 https://api.github.com/repos/pydata/xarray/issues/3445 MDEyOklzc3VlQ29tbWVudDU1MDUxNjc0NQ== friedrichknuth 10554254 2019-11-06T21:51:31Z 2019-11-06T21:51:31Z NONE

Note that dataset1 = xr.concat([data_array1,data_array2],dim='source') or dim='receiver' seem to work, however, concat also fails if time is specified as the dimension.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Merge fails when sparse Dataset has overlapping dimension values 512205079

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 13.987ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows