home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

6 rows where repo = 13221727, state = "closed" and user = 11671536 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)

type 2

  • issue 5
  • pull 1

state 1

  • closed · 6 ✖

repo 1

  • xarray · 6 ✖
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
231838537 MDU6SXNzdWUyMzE4Mzg1Mzc= 1431 inconsistent behavior in stack/unstack along one dimension d-chambers 11671536 closed 0     4 2017-05-28T01:07:09Z 2019-05-22T21:49:13Z 2019-05-22T21:49:13Z NONE      

I am using Ubuntu 16, python 3.6, and xarray 0.9.1

A DataArray can be stacked along one dimension, but when unstack is called a ValueError is raised. It seems that either unstack should work, or calling stack should also raise a ValueError.

```python import xarray as xr

dims = ['a', 'b'] coords = {'a': range(2), 'b':range(2)} values = [[0, 0], [0, 0]]

dar = xr.DataArray(values, coords, dims)

stacked = dar.stack(z=('a',)) # this works

unstack = stacked.unstack('z') # this raises ValueError

```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1431/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
231835326 MDU6SXNzdWUyMzE4MzUzMjY= 1430 setting values with getattr performs wrong opperation with multi-dimensional coordinate d-chambers 11671536 closed 0     3 2017-05-27T23:44:14Z 2019-04-30T03:17:20Z 2019-04-30T03:17:20Z NONE      

I am using Ubuntu 16, python 3.6, and xarray 0.9.1

Consider the following code: ```python import xarray as xr import numpy as np

dims = ['a', 'b'] coords = {'a': range(2), 'b':range(2), 'group': (('a', 'b'), [[0, 0], [0, 1]])} values = [[0, 0], [0, 0]]

dar = xr.DataArray(values, coords, dims)

dar[dict(group=0)] = 1 # group is only 0 for three of the four elements

expected_values = np.array([[1, 1], [1, 0]])

yet this raises because all four values are set to 1

assert np.all(np.isclose(dar.values, expected_values)) ```

I suspect trying to assign values in this way using a multi-dimensional coordinate should raise a ValueError as this does:

python dar[dict(group=0)]

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1430/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
232726778 MDU6SXNzdWUyMzI3MjY3Nzg= 1436 Wrong dimension referenced in boolean indexing with .loc d-chambers 11671536 closed 0     3 2017-05-31T23:35:08Z 2017-10-19T23:54:03Z 2017-10-19T23:54:03Z NONE      

I am using Ubuntu 16, python 3.6, and xarary 0.9.5.

```python import numpy as np import xarray as xr

setup for a simple grid

DX = 50 X = np.arange(0, 2010, DX) Y = np.arange(0, 2010, DX) Z = np.arange(0, 2010, DX) grid_shape = (len(X), len(Y), len(Z))

Create data array

dims = 'X Y Z'.split() coords = {'X': X, 'Y': Y, 'Z': Z} dar = xr.DataArray(np.ones(grid_shape), dims=dims, coords=coords)

slice the data array so that all Z values are greater than 1000

dar2 = dar.loc[dar.Z > 1000] assert np.all(dar2.Z > 1000) # fails becase dar is sliced along X, not Z ``` Since the object returned from dar.Z > 1000 is a data array with "Z" as the only dim I would expect this to slice the "Z" dim rather than X.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1436/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
228872889 MDU6SXNzdWUyMjg4NzI4ODk= 1410 to_netcdf without path argument returns None rather than bytes d-chambers 11671536 closed 0     2 2017-05-15T23:18:54Z 2017-09-05T13:50:55Z 2017-09-05T13:50:55Z NONE      

I am using: Ubuntu 16.04 python 3.6.0 xarray 0.9.1 scipy 0.18.1

The documentation states that if no path argument is passed to the to_netcdf method of the DataArray class it returns a bytes object. However, it returns None.

python import xarray as xr dar = xr.DataArray([1, 2, 3]) output = dar.to_netcdf() assert isinstance(output, bytes) # fails because output is None

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1410/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
208676242 MDU6SXNzdWUyMDg2NzYyNDI= 1276 DataArray doesnt use bottleneck implementation on rolling variance d-chambers 11671536 closed 0     2 2017-02-18T22:22:16Z 2017-03-06T01:32:14Z 2017-03-06T01:32:14Z NONE      

It appears that the DataArray is not using the bottleneck move_var when calling var on a rolling object but it does for std. I have attached some simple benchmarks to demonstrate.

python version 3.6 pandas version 0.19.2 xarray version 0.9.1 bottleneck version 1.2.0

```python import numpy as np import xarray as xr import bottleneck import pandas as pd

data = np.random.rand(10000)

xarray setup

ar = xr.DataArray(data, dims=['time']) xrol = ar.rolling(time=30)

pandas setup

df = ar.to_pandas() prol = df.rolling(30) ```

```python

xray std profile

%time _ = xrol.std() ```

CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 209 µs

```python

xray var profile

%time _ = xrol.var() ```

CPU times: user 8.69 s, sys: 132 ms, total: 8.82 s
Wall time: 8.52 s

```python

pandas std profile

%time _ = prol.std() ```

CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 1.13 ms

```python

pandas var profile

%time _ = prol.var() ```

CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 617 µs

```python

bottleneck std profile

%time _ = bottleneck.move_std(data, 30) ```

CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 138 µs

```python

bottleneck var profile

%time _ = bottleneck.move_var(data, 30) ```

CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 143 µs
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1276/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
208582080 MDExOlB1bGxSZXF1ZXN0MTA2ODI5Njcz 1275 fixed simple typo d-chambers 11671536 closed 0     1 2017-02-17T23:09:37Z 2017-02-18T03:30:40Z 2017-02-18T01:40:34Z NONE   0 pydata/xarray/pulls/1275

fixed a small type in the docs

  • [ ] closes #xxxx
  • [ ] tests added / passed
  • [ ] passes git diff upstream/master | flake8 --diff
  • [ ] whatsnew entry
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1275/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 75.451ms · About: xarray-datasette