home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

3 rows where user = 21273359 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 3

state 1

  • closed 3

repo 1

  • xarray 3
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
864505158 MDU6SXNzdWU4NjQ1MDUxNTg= 5206 How can I apply Groupby function and still keep the chunks ? babameme 21273359 closed 1     1 2021-04-22T03:33:12Z 2021-04-22T17:35:42Z 2021-04-22T17:35:41Z NONE      
  1. I have an 2-dims DataArray which be chunked along 1-dim I apply groupby operation on it, and it breaks out the chunks I expect it keeps the chunk, how can i process it correctly ?

  2. Code:

da = xr.DataArray(np.arange(120).reshape(24, 5), coords = {"x": range(24), "y":range(5)}, dims = ("x", "y")) da = da.chunk(chunks = {"x" : 5})

da show:

```

da xarray.DataArray x: 24y: 5 dask.array<chunksize=(5, 5), meta=np.ndarray> Coordinates: x (x) int64 0 1 2 3 4 5 6 ... 18 19 20 21 22 23 y (y) int64 0 1 2 3 4 Attributes: (0)

da.groupby("x").quantile(0.02, dim = "y") ``` Result:

xarray.DataArrayx: 24 dask.array<chunksize=(1,), meta=np.ndarray> Coordinates: quantile () float64 0.02 x (x) int64 0 1 2 3 4 5 6 ... 18 19 20 21 22 23 Attributes: (0)

  1. Version of xr:
Details INSTALLED VERSIONS ------------------ commit: None python: 3.7.8 | packaged by conda-forge | (default, Jul 31 2020, 02:25:08) [GCC 7.5.0] python-bits: 64 OS: Linux OS-release: 5.8.9-1.el7.elrepo.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.12.0 libnetcdf: 4.7.4 xarray: 0.17.0 pandas: 1.1.4 numpy: 1.19.1 scipy: 1.5.2 netCDF4: 1.5.6 pydap: None h5netcdf: None h5py: 3.2.1 Nio: None zarr: None cftime: 1.4.1 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2.30.0 distributed: 2.30.1 matplotlib: 3.3.2 cartopy: None seaborn: 0.11.0 numbagg: None pint: None setuptools: 49.6.0.post20210108 pip: 21.0.1 conda: None pytest: 6.0.2 IPython: 7.22.0 sphinx: 3.2.1
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5206/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
864494256 MDU6SXNzdWU4NjQ0OTQyNTY= 5205 Clip function with minimum or maximum nan value babameme 21273359 closed 1     9 2021-04-22T03:06:24Z 2021-04-22T17:34:59Z 2021-04-22T17:34:58Z NONE      

Hi team,

  1. Concise description about the problem: Clip function with minimum or maximum nan value

I see that with 1-dim DataArray, we can clip with minimum or maximum nan value:

python xx = xr.DataArray([1, 3, 5], dims = "x") xx.clip(np.nan, 4)

Result:

xarray.DataArrayx: 3 array([1., 3., 4.]) Coordinates: (0) Attributes: (0)

But with 2-dims DataArray, if one of two bounds is np.nan, we will receive nan value:

python da = xr.DataArray(np.arange(18).reshape(3, 6), coords = {"x": range(3), "y":range(6)}, dims = ("x", "y")) lower = xr.DataArray([1, 2, np.nan], coords = {"x": [0, 1, 2]}, dims = ["x"]) upper = xr.DataArray([4, 10, 14], coords = {"x": [0, 1, 2]}, dims = ["x"]) lower = xr.broadcast(da, lower)[1] upper = xr.broadcast(da, upper)[1] da.clip(lower, upper)

Result:

xarray.DataArrayx: 3y: 6 array([[ 1., 1., 2., 3., 4., 4.], [ 6., 7., 8., 9., 10., 10.], [nan, nan, nan, nan, nan, nan]]) Coordinates: x (x) int64 0 1 2 y (y) int64 0 1 2 3 4 5 Attributes: (0)

  1. Describe the solution i would like:

The clip function perform well with 2-dims as it done in 1-dims

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5205/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
858671865 MDU6SXNzdWU4NTg2NzE4NjU= 5162 Monthly Rolling babameme 21273359 closed 1     3 2021-04-15T09:09:43Z 2021-04-15T21:23:26Z 2021-04-15T21:23:25Z NONE      

Hi team, I am trying to rolling by Monthly with Xarray DataArray With Pandas Dataframe, i can use: df.rolling("30D") or df.rolling("1M") How can i do this with Xarray ? Thanks

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