home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

2 rows where repo = 13221727 and user = 25030860 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 1

  • issue 2

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
199816142 MDU6SXNzdWUxOTk4MTYxNDI= 1197 Problem with creating coords by dict SpghttCd 25030860 closed 0     7 2017-01-10T13:05:25Z 2017-08-31T19:17:29Z 2017-08-31T19:17:29Z NONE      

IMO there's a problem with using dicts as coords definition for DataArrays. E.g. an array defined by import xarray as xr arr = xr.DataArray(np.zeros([1, 2, 3]), {'x': [1], 'y': [1, 2], 'z': [1, 2, 3]}) will lead to an exception when tried to be indexed like arr[0, 0, 0]

The error message is ValueError: conflicting sizes for dimension 'z': length 2 on <this-array> and length 3 on 'z'

As far as I can imagine this is because dicts don't preserve order in python. At least printing the coords shows a different order than used in the definition of arr: arr.coords Coordinates: * x (x) int32 1 * z (z) int32 1 2 3 * y (y) int32 1 2

Using an ordered dict turns out to work: import collections od = collections.OrderedDict([('x', [1]), ('y', [1, 2]), ('z', [1, 2, 3])]) arr = xr.DataArray(np.zeros([1, 2, 3]), od) And so does using a list of tuples: arr = xr.DataArray(np.zeros([1, 2, 3]), [('x', [1]), ('y', [1, 2]), ('z', [1, 2, 3])])

Both lead to arr[0, 0, 0] <xarray.DataArray ()> array(0.0) Coordinates: x int32 1 y int32 1 z int32 1 as expected.

Detected in WinPython-64bit-3.4.4.1Qt5 with xarray version 0.7.0

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1197/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
204550216 MDU6SXNzdWUyMDQ1NTAyMTY= 1244 wrong decoding of loaded dataset from nc-file SpghttCd 25030860 closed 0     10 2017-02-01T10:45:43Z 2017-02-06T07:09:28Z 2017-02-06T07:09:28Z NONE      

Hello I just upgraded from xarray 0.7.0 to 0.9.0 and noticed that the data in the variables are decoded wrong in the newer version. With ds = xr.open_dataset(filename.nc) in 0.7.0, the resulting dataset was correctly displayed as python <xarray.Dataset> Dimensions: (D1: 3601, X: 5, Z: 5) Coordinates: * D1 (D1) float64 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 ... * Z (Z) float64 1.0 2.0 3.0 4.0 5.0 * X (X) float64 -2.0 -1.0 0.0 1.0 2.0 Data variables: Brad (D1, Z, X) float64 -1.592 0.44 3.032 5.408 4.428 -0.68 0.432 ... Btan (D1, Z, X) float64 -13.33 -12.1 -10.68 -7.524 -4.032 -5.44 ... Bax (D1, Z, X) float64 11.97 12.3 11.7 7.86 3.14 6.112 6.188 5.524 ... T (D1, Z, X) float64 26.79 27.23 26.87 26.75 27.42 27.85 27.19 ... With 0.9.0 the same file shows up the following way python <xarray.Dataset> Dimensions: (D1: 3601, X: 5, Z: 5) Coordinates: * D1 (D1) float64 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 ... * Z (Z) float64 1.0 2.0 3.0 4.0 5.0 * X (X) float64 254.0 255.0 0.0 1.0 2.0 Data variables: Brad (D1, Z, X) float64 32.83 32.77 32.77 57.02 58.94 58.98 58.98 ... Btan (D1, Z, X) float64 33.29 1.835 22.81 16.38 23.33 65.27 15.47 ... Bax (D1, Z, X) float64 11.97 12.3 11.7 7.86 3.14 6.112 6.188 5.524 ... T (D1, Z, X) float64 1.19 1.63 1.27 1.15 1.82 2.25 1.59 1.37 1.33 ... The first thing I guessed was some problem with the decoding according to CF-conventions - but this behaviour is independent from if I used CF-conventions-conform compressing via scale and add_offset or not. Note that both file versions for testing (float64 and integer-compressed) were written with xarray 0.7.0

I hope I didn't miss some important changes between 0.7.0 and 0.9.0, but imho there's no related topic in the changelog, which told me what's the reason here.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1244/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 5277.629ms · About: xarray-datasette