home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

5 rows where type = "issue" and user = 8268008 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

state 2

  • closed 4
  • open 1

type 1

  • issue · 5 ✖

repo 1

  • xarray 5
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
267521588 MDU6SXNzdWUyNjc1MjE1ODg= 1646 Make passing a DataArray for the xarray.concat dim argument equivalent to passing a pandas Index ceridwen 8268008 open 0     8 2017-10-23T02:09:58Z 2023-01-08T08:04:40Z   NONE      

Extending from #839, if I'm concatenating some DataArrays using concat,

print(xarray.concat(data, xarray.DataArray(['foo1', 'foo2', 'foo3', 'foo4', 'foo5'], name='stat'))

I get an unnamed dimension without coordinates.

<xarray.DataArray (dim_0: 5, index: 2)> array([[ 24.841064, 0.750451], [ 24.841064, 0.750451], [ 19.062874, 0.796722], [ 14.9631 , 0.354273], [ 14.9631 , 0.354273]]) Coordinates: * index (index) object 'Intercept' 'Lvl' (dim_0) <U3 'foo1' foo2' 'foo3' 'foo4' 'foo5' Dimensions without coordinates: dim_0

Using a pandas.Index,

print(xarray.concat(data, pandas.Index(['foo1', 'foo2', 'foo3', 'foo4', 'foo5'], name='stat'))

<xarray.DataArray (stat: 5, index: 2)> array([[ 14.9631 , 0.354273], [ 19.982272, 0.555708], [ 14.974026, 0.60658 ], [ 24.841064, 0.750451], [ 24.841064, 0.750451]]) Coordinates: * index (index) object 'Intercept' 'Lvl' * stat (stat) object 'foo1' 'foo2' 'foo3' 'foo4' 'foo5'

I want the latter, not the former, but I expected the latter when using a DataArray.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1646/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 issue
176406182 MDU6SXNzdWUxNzY0MDYxODI= 1003 Bytes being transformed to a numpy array with dtype=object in coordinates ceridwen 8268008 closed 0     2 2016-09-12T15:28:21Z 2019-02-25T15:28:23Z 2019-02-25T15:28:23Z NONE      

This relates again to this code: https://gist.github.com/ceridwen/21f86231e86b72bf18fcc16fcee01548 .

``` python dataset = transform.read_games(['2016-06.json'])

dataset <xarray.Dataset> Dimensions: (event: 91, faction: 20, game: 2643, round: 7) Coordinates: * round (round) int64 0 1 2 3 4 5 6 * faction (faction) |S14 b'acolytes' b'alchemists' b'auren' ... * event (event) |S26 b'action:ACT1' b'action:ACT2' b'action:ACT3' ... * game (game) object b'005Stedda' b'006St3dda' b'00s10' b'0106' ... Data variables: player5 (game) |S17 b'Stedda' b'Muchacho' b'' b'modong' b'' b'' ... player3 (game) |S19 b'Emoht' b'Xrystofer' b'' b'runrun57' ... date (game) datetime64[ns] 2016-06-07T22:30:47 ... player1 (game) |S22 b'ocollard' b'BillyMirmidon' b'00' b'Animax' ... player2 (game) |S21 b'Mies730' b'Stedda' b'romance90' ... scoring_tiles (game, round) |S6 b'' b'SCORE9' b'SCORE4' b'SCORE2' ... player4 (game) |S20 b'Deryl' b'CarpalTunnel' b'' b'Zak_tak' b'' ... events (game, faction, event, round) float16 nan nan nan nan nan ... players_count (game) int8 5 5 2 5 3 3 4 4 4 4 4 4 5 5 5 5 5 5 5 3 3 4 2 ... ```

Notice that the dtype for the coordinate game is object, even though games is a list of bytes, that is {type(e) for e in names} evaluates to {bytes}.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1003/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
176399665 MDU6SXNzdWUxNzYzOTk2NjU= 1001 "RuntimeError: NetCDF: Not a valid ID" error when trying to operate on a netCDF file using netCDF4 ceridwen 8268008 closed 0     1 2016-09-12T15:03:54Z 2016-09-13T02:33:28Z 2016-09-13T02:33:28Z NONE      

I have some code that writes out a netCDF file, https://gist.github.com/ceridwen/21f86231e86b72bf18fcc16fcee01548

When I try to do math on this dataset after loading it, though, I get an error:

``` python

with xarray.open_dataset('snellman.nc') as dataset: ... print(dataset) ... <xarray.Dataset> Dimensions: (event: 91, faction: 20, game: 2643, round: 7) Coordinates: * faction (faction) |S14 b'acolytes' b'alchemists' b'auren' ... * event (event) |S26 b'action:ACT1' b'action:ACT2' b'action:ACT3' ... * game (game) |S32 b'005Stedda' b'006St3dda' b'00s10' b'0106' ... * round (round) int64 0 1 2 3 4 5 6 Data variables: player5 (game) |S17 b'Stedda' b'Muchacho' b'' b'modong' b'' b'' ... players_count (game) int8 5 5 2 5 3 3 4 4 4 4 4 4 5 5 5 5 5 5 5 3 3 4 2 ... date (game) datetime64[ns] 2016-06-07T22:30:47 ... player3 (game) |S19 b'Emoht' b'Xrystofer' b'' b'runrun57' ... player4 (game) |S20 b'Deryl' b'CarpalTunnel' b'' b'Zak_tak' b'' ... player1 (game) |S22 b'ocollard' b'BillyMirmidon' b'00' b'Animax' ... scoring_tiles (game, round) |S6 b'' b'SCORE9' b'SCORE4' b'SCORE2' ... events (game, faction, event, round) float32 nan nan nan nan nan ... player2 (game) |S21 b'Mies730' b'Stedda' b'romance90' ...

dataset.mean(dim='round') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/user/.local/lib/python3.5/site-packages/xarray/core/common.py", line 41, in wrapped_func **kwargs) File "/home/user/.local/lib/python3.5/site-packages/xarray/core/dataset.py", line 1734, in reduce np.issubdtype(var.dtype, np.number) or File "/home/user/.local/lib/python3.5/site-packages/xarray/core/variable.py", line 244, in dtype return self._data.dtype File "/home/user/.local/lib/python3.5/site-packages/xarray/core/utils.py", line 385, in dtype return self.array.dtype File "/home/user/.local/lib/python3.5/site-packages/xarray/conventions.py", line 436, in dtype return np.dtype('S' + str(self.array.shape[-1])) File "/home/user/.local/lib/python3.5/site-packages/xarray/core/indexing.py", line 346, in shape for size, k in zip(self.array.shape, self.key): File "/home/user/.local/lib/python3.5/site-packages/xarray/core/utils.py", line 389, in shape return self.array.shape File "netCDF4/_netCDF4.pyx", line 3378, in netCDF4._netCDF4.Variable.shape.get (netCDF4/_netCDF4.c:32838) File "netCDF4/_netCDF4.pyx", line 3323, in netCDF4._netCDF4.Variable._getdims (netCDF4/_netCDF4.c:31915) RuntimeError: NetCDF: Not a valid ID ```

Note that if I generate the dataset without writing it to a file and loading it, the same operation doesn't cause an error:

``` python

dataset.mean(dim='round') <xarray.Dataset> Dimensions: (event: 91, faction: 20, game: 2643) Coordinates: * faction (faction) |S14 b'acolytes' b'alchemists' b'auren' ... * event (event) |S26 b'action:ACT1' b'action:ACT2' b'action:ACT3' ... * game (game) object b'005Stedda' b'006St3dda' b'00s10' b'0106' ... Data variables: player5 (game) |S17 b'Stedda' b'Muchacho' b'' b'modong' b'' b'' ... player2 (game) |S21 b'Mies730' b'Stedda' b'romance90' ... player4 (game) |S20 b'Deryl' b'CarpalTunnel' b'' b'Zak_tak' b'' ... player3 (game) |S19 b'Emoht' b'Xrystofer' b'' b'runrun57' ... players_count (game) int8 5 5 2 5 3 3 4 4 4 4 4 4 5 5 5 5 5 5 5 3 3 4 2 ... date (game) datetime64[ns] 2016-06-07T22:30:47 ... player1 (game) |S22 b'ocollard' b'BillyMirmidon' b'00' b'Animax' ... events (game, faction, event) float16 nan nan nan nan nan nan ... ```

This is with xarray (0.8.2) and netCDF4 (1.2.4). It may be a bug in netCDF rather than xarray itself. See also the crash in #1002, which may or may not be related.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1001/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
176403875 MDU6SXNzdWUxNzY0MDM4NzU= 1002 KeyError when trying to operate on a netCDF file created and read with scipy ceridwen 8268008 closed 0     1 2016-09-12T15:19:52Z 2016-09-13T02:33:14Z 2016-09-13T02:33:14Z NONE      

This is possibly related to #1001. With the same code and test data, using engine='scipy' in the to_netcdf() and open_dataset() calls,

``` python

import xarray with xarray.open_dataset('snellman.nc', engine='scipy') as dataset: ... print(dataset) ... <xarray.Dataset> Dimensions: (event: 91, faction: 20, game: 2643, round: 7) Coordinates: * game (game) |S32 b'005Stedda' b'006St3dda' b'00s10' b'0106' ... * event (event) |S26 b'action:ACT1' b'action:ACT2' b'action:ACT3' ... * faction (faction) |S14 b'acolytes' b'alchemists' b'auren' ... * round (round) int64 0 1 2 3 4 5 6 Data variables: player5 (game) |S17 b'Stedda' b'Muchacho' b'' b'modong' b'' b'' ... player2 (game) |S21 b'Mies730' b'Stedda' b'romance90' ... date (game) datetime64[ns] 2016-06-07T22:30:47 ... player3 (game) |S19 b'Emoht' b'Xrystofer' b'' b'runrun57' ... player1 (game) |S22 b'ocollard' b'BillyMirmidon' b'00' b'Animax' ... players_count (game) int8 5 5 2 5 3 3 4 4 4 4 4 4 5 5 5 5 5 5 5 3 3 4 2 ... events (game, faction, event, round) float32 nan nan nan nan nan ... player4 (game) |S20 b'Deryl' b'CarpalTunnel' b'' b'Zak_tak' b'' ... scoring_tiles (game, round) |S6 b'' b'SCORE9' b'SCORE4' b'SCORE2' ... ds.mean(dim='round') Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'ds' is not defined dataset.mean(dim='round') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/user/.local/lib/python3.5/site-packages/xarray/core/common.py", line 41, in wrapped_func **kwargs) File "/home/user/.local/lib/python3.5/site-packages/xarray/core/dataset.py", line 1734, in reduce np.issubdtype(var.dtype, np.number) or File "/home/user/.local/lib/python3.5/site-packages/xarray/core/variable.py", line 244, in dtype return self.data.dtype File "/home/user/.local/lib/python3.5/site-packages/xarray/core/utils.py", line 385, in dtype return self.array.dtype File "/home/user/.local/lib/python3.5/site-packages/xarray/backends/scipy.py", line 46, in dtype return np.dtype(self.array.dtype.kind + str(self.array.dtype.itemsize)) File "/home/user/.local/lib/python3.5/site-packages/xarray/backends/scipy_.py", line 41, in array return self.netcdf_file.variables[self.variable_name].data KeyError: 'events' ```

As in #1001, the same .mean() call doesn't crash if I'm not trying to load it from a file.

This is with xarray (0.8.2) and scipy (0.18.0).

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1002/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
176064045 MDU6SXNzdWUxNzYwNjQwNDU= 999 concat() documentation has a wrong keyword ceridwen 8268008 closed 0     4 2016-09-09T17:29:34Z 2016-09-12T03:04:01Z 2016-09-10T22:20:21Z NONE      

In https://xray.readthedocs.io/en/stable/combining.html, concat() is called with name='new_dim', but that's not a valid keyword any more.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/999/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue

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