home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

7 rows where state = "closed" and user = 2599958 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 2

state 1

  • closed · 7 ✖

repo 1

  • xarray 7
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
621968474 MDU6SXNzdWU2MjE5Njg0NzQ= 4085 lazy evaluation of large arrays fails hetland 2599958 closed 0     4 2020-05-20T17:51:02Z 2020-05-20T19:11:57Z 2020-05-20T19:11:56Z NONE      

I have a large DataSet, including these DataArrays:

<xarray.DataArray 'temp' (ocean_time: 1325, s_rho: 30, eta_rho: 602, xi_rho: 677)>
dask.array<concatenate, shape=(1325, 30, 602, 677), dtype=float32, chunksize=(1, 1, 602, 677)>

and

<xarray.DataArray 'zeta' (ocean_time: 1325, eta_rho: 602, xi_rho: 677)>
dask.array<concatenate, shape=(1325, 602, 677), dtype=float32, chunksize=(1, 602, 677)>

(The coordinates and attributes excluded for brevity, but they match in the right ways.)

When I do math operations with the 4D DataArray (temp) and 3D DataArray (zeta), no problem:

ds.zeta * ds.temp

<xarray.DataArray (ocean_time: 1325, eta_rho: 602, xi_rho: 677, s_rho: 30)>
dask.array<mul, shape=(1325, 602, 677, 30), dtype=float32, chunksize=(1, 602, 677, 1)>

This returns an object instantly, and the result is lazily evaluated. However, if I just try to add temp to itself,

ds.temp + ds.temp

this fails (eventually) as my medium sized computer runs out of memory, since it starts to evaluate the numbers as if I did a compute() or asked for the values. Note 2*ds.temp or ds.temp**2 is lazily evaluated, and returns an object instantly. Chunk size does not seem to be an issue, as I have tried a number of reasonable choices without success.

Why can't such simple math operations between two large arrays also be lazily evaluated?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4085/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
469344355 MDU6SXNzdWU0NjkzNDQzNTU= 3138 Plotting with 2d coordinates, error in transposed coordinate hetland 2599958 closed 0     3 2019-07-17T17:16:51Z 2019-12-04T16:45:13Z 2019-12-04T16:45:13Z NONE      

This is similar to issue #1503, but specifically deals with requiring the correct order of dimensions for plotting 2d coordinates. An example of the issue is:

```

create an example dataset

dates = pd.date_range('2000-01-01', '2001-12-31', name='time') times = dates - dates[0]

x = np.linspace(0, 10, 101)

h = np.linspace(3, 7, 101) s = np.linspace(0, 1, 51) z = s[:, np.newaxis] * h[np.newaxis, :]

data = (np.sin(x) * np.cos(z)) * np.cos(np.asarray(times.days[:, np.newaxis, np.newaxis]))

create an xarray dataset

ds = xr.Dataset({'data': (('time', 's', 'x'), data)}, {'time':dates, 'x':x, 's':s, 'z':(('s', 'x'), z)}) ds.coords['zt'] = ds.z.transpose() `` plotting withzandzt` should give the same results, since the dimensions are clearly labeled and other than the order of the dimensions, they are exactly the same.

This works: ds.data[0].plot(x='x', y='z')

This does not: ds.data[0].plot(x='x', y='zt')

Broadcasting, e.g., does not give a similar error. Specifically, this is true: np.allclose((ds.data * ds.zt).values, (ds.data * ds.z).values)

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3138/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
467768201 MDExOlB1bGxSZXF1ZXN0Mjk3MzQ4ODgy 3116 Added ROMS ocean model example notebook hetland 2599958 closed 0     14 2019-07-13T21:29:01Z 2019-08-23T16:18:04Z 2019-08-16T14:16:26Z NONE   0 pydata/xarray/pulls/3116
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API

This is an example of reading and visualizing ROMS model output. A highlight is adding a lazily calculated vertical coordinate. This notebook will need an example ROMS output file to run, called ROMS_example.nc. This will be uploaded to the data repository.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3116/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
468295911 MDExOlB1bGxSZXF1ZXN0Mjk3NzU1Mzcz 3134 Revised ROMS example notebook hetland 2599958 closed 0     1 2019-07-15T19:27:15Z 2019-07-16T15:58:15Z 2019-07-16T15:58:15Z NONE   0 pydata/xarray/pulls/3134

I revised the ROMS example notebook to use xr.tutorial.open_dataset, and made some additions to the documentation in the notebook for clarity.

  • [ ] Closes #xxxx
  • [ ] Tests added
  • [ ] Fully documented, including whats-new.rst for all changes and api.rst for new API
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3134/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
94159634 MDU6SXNzdWU5NDE1OTYzNA== 461 CF compliant variables. hetland 2599958 closed 0     2 2015-07-09T21:49:43Z 2019-03-12T15:01:18Z 2019-03-12T15:01:18Z NONE      

Create a new container in variables for CF convention variables. E.g.,

ds.salt.cf.x ds.salt.cf.lon # (maybe also?)

which would pass through ds.salt.x_rho (the x coordinate), or ds.salt.lon_rho.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/461/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
94160506 MDU6SXNzdWU5NDE2MDUwNg== 462 Create a way to calculate computed coordinates hetland 2599958 closed 0     2 2015-07-09T21:54:50Z 2019-03-03T12:23:58Z 2019-03-03T12:23:58Z NONE      

Create computed coordinates in a lazy way, given a user defined equation for defining these coordinates.

E.g.,

my_depths(params): # do the calculation return depths

Then, link ds.salt.z to my_depths, such that

ds.salt.z

returns the depths, calculated on request. Or better, an object that returns values only upon indexing.

See, e.g., The equations: https://github.com/hetland/octant/blob/master/octant/depths.py

One way to do the lazy calculations just in python https://github.com/hetland/octant/blob/68f51005480c8cb9f83098b0f751b4e8086c11b5/octant/roms.py#L244

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/462/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
94159276 MDU6SXNzdWU5NDE1OTI3Ng== 460 Create method to return a masked array hetland 2599958 closed 0     2 2015-07-09T21:48:22Z 2016-01-04T23:11:55Z 2015-08-12T18:34:16Z NONE      

This is mainly for plotting in MPL, which does not like NaNs.

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