home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

9 rows where user = 56925856 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 2

  • pull 6
  • issue 3

state 2

  • closed 8
  • open 1

repo 1

  • xarray 9
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
904153867 MDExOlB1bGxSZXF1ZXN0NjU1MzI2MjM4 5390 Improvements to lazy behaviour of `xr.cov()` and `xr.corr()` AndrewILWilliams 56925856 open 0     11 2021-05-27T20:22:08Z 2023-12-07T02:25:56Z   CONTRIBUTOR   0 pydata/xarray/pulls/5390

Following @willirath 's suggestion in #4804, I've changed https://github.com/pydata/xarray/blob/master/xarray/core/computation.py#L1373_L1375 so that Dask doesn't hold all chunks in memory

  • [x] Closes (more of) #4804, specifically this comment
  • [x] Passes pre-commit run --all-files
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5390/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
904149592 MDExOlB1bGxSZXF1ZXN0NjU1MzIyNTU1 5389 ignore this AndrewILWilliams 56925856 closed 0     0 2021-05-27T20:16:22Z 2021-05-27T20:22:43Z 2021-05-27T20:16:45Z CONTRIBUTOR   0 pydata/xarray/pulls/5389

ignore this, I did the branching wrong...

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5389/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
882876804 MDExOlB1bGxSZXF1ZXN0NjM2Mzg1Mjc2 5284 Dask-friendly nan check in xr.corr() and xr.cov() AndrewILWilliams 56925856 closed 0     8 2021-05-09T22:06:03Z 2021-05-27T17:31:07Z 2021-05-27T17:31:07Z CONTRIBUTOR   0 pydata/xarray/pulls/5284

Was reading the discussion here and thought I'd draft a PR to implement some of the changes people suggested. It seems like the main problem is that currently in computation.py, if not valid_values.all() is not a lazy operation, and so can be a bottleneck for very large dataarrays. To get around this, I've lifted some neat tricks from #4559 so that valid_values remains a dask array.


  • [x] Closes #4804
  • [x] Tests added
  • [x] Passes pre-commit run --all-files
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5284/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
786839234 MDU6SXNzdWU3ODY4MzkyMzQ= 4816 Possible bug with da.interp_like() AndrewILWilliams 56925856 closed 0     1 2021-01-15T11:54:50Z 2021-01-15T12:17:18Z 2021-01-15T12:17:18Z CONTRIBUTOR      

What happened: When interpolating a multidimensional array, I used the fill_value=None kwarg, as in the scipy docs it says that If None, values outside the domain are extrapolated.

What you expected to happen: However, this did not work and the array was filled with nans instead of being extrapolated. I had to explicitly add fill_value='extrapolate' in order to get extrapolation to work.

However, as far as I can tell, in this context interp_like() should be calling scipy.interpolate.interpn(), which doesn't seem to require fill_value='extrapolate'?

I might be misunderstanding something here, but if not then I think there might be a bug? Happy to be corrected if I've misunderstood the docs!

Minimal Complete Verifiable Example:

```python

Put your MCVE code here

import xarray as xr import numpy as np

da = xr.DataArray( np.array(([1,2,3,4,0],[1,2,3,9,0])), dims=["x", "y"], coords={"x": [0,1],"y": [0,1,2,3,4]} )

da2 = xr.DataArray( np.array(([2,3,0,4,5,6],[2,3,0,4,5,6],[2,3,0,4,5,6])), dims=["x", "y"], coords={"x": [0,1,2],"y": [0,1,2,3,4,5]} )

print(da.interp_like(da2)) <xarray.DataArray (x: 3, y: 6)> array([[ 1., 2., 3., 4., 0., nan], [ 1., 2., 3., 9., 0., nan], [nan, nan, nan, nan, nan, nan]]) Coordinates: * x (x) int64 0 1 2 * y (y) int64 0 1 2 3 4 5

print(da.interp_like(da2, kwargs={'fill_value':None})) <xarray.DataArray (x: 3, y: 6)> array([[ 1., 2., 3., 4., 0., nan], [ 1., 2., 3., 9., 0., nan], [nan, nan, nan, nan, nan, nan]]) Coordinates: * x (x) int64 0 1 2 * y (y) int64 0 1 2 3 4 5

print(da.interp_like(da2, kwargs={'fill_value':'extrapolate'})) <xarray.DataArray (x: 3, y: 6)> array([[ 1., 2., 3., 4., 0., -4.], [ 1., 2., 3., 9., 0., -9.], [ 1., 2., 3., 14., 0., -14.]]) Coordinates: * x (x) int64 0 1 2 * y (y) int64 0 1 2 3 4 5 ```

Environment:

Output of <tt>xr.show_versions()</tt> INSTALLED VERSIONS ------------------ commit: None python: 3.6.12 |Anaconda, Inc.| (default, Sep 8 2020, 23:10:56) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 3.10.0-1127.19.1.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_GB.UTF-8 LOCALE: en_GB.UTF-8 libhdf5: 1.10.5 libnetcdf: 4.6.2 xarray: 0.16.1 pandas: 1.1.5 numpy: 1.19.2 scipy: 1.5.2 netCDF4: 1.5.1.2 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.3.0 nc_time_axis: None PseudoNetCDF: None rasterio: 1.1.8 cfgrib: None iris: None bottleneck: 1.3.2 dask: 2.30.0 distributed: 2.30.1 matplotlib: 3.3.3 cartopy: 0.18.0 seaborn: None numbagg: None pint: None setuptools: 51.0.0.post20201207 pip: 20.3.3 conda: None pytest: None IPython: 7.16.1 sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4816/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
625064501 MDExOlB1bGxSZXF1ZXN0NDIzMzU0MjIw 4096 Corrcov typo fix AndrewILWilliams 56925856 closed 0     4 2020-05-26T17:44:07Z 2020-05-27T03:09:37Z 2020-05-26T19:03:25Z CONTRIBUTOR   0 pydata/xarray/pulls/4096

Fixing typo in recent PR #4089

  • [x] Closes https://github.com/pydata/xarray/pull/4089#issuecomment-634157768
  • [x] Passes isort -rc . && black . && mypy . && flake8
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4096/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
623751213 MDExOlB1bGxSZXF1ZXN0NDIyMzMzMTg0 4089 xr.cov() and xr.corr() AndrewILWilliams 56925856 closed 0     20 2020-05-23T22:09:07Z 2020-05-26T18:31:31Z 2020-05-25T16:55:33Z CONTRIBUTOR   0 pydata/xarray/pulls/4089

PR for the xr.cov() and xr.corr() functionality which others have been working on. Most code adapted from @r-beer in PR #3550.

TODO: - [x] ~Write a reasonable set of tests, maybe not using pandas as a benchmark? (See https://github.com/pydata/xarray/issues/3784#issuecomment-633145887) Will probably need some help with this~

CHECKLIST: - [x] Closes #3784, #3550, #2652, #1115 - [x] Tests added - [x] Passes isort -rc . && black . && mypy . && flake8 ~(something wrong with docs though??)~ - [x] Fully documented, including whats-new.rst for all changes and api.rst for new API

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4089/reactions",
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
618828102 MDExOlB1bGxSZXF1ZXN0NDE4NDc4MjY5 4064 Auto chunk AndrewILWilliams 56925856 closed 0     23 2020-05-15T09:25:13Z 2020-05-25T20:38:53Z 2020-05-25T19:23:45Z CONTRIBUTOR   0 pydata/xarray/pulls/4064

Adding chunks='auto' option to Dataset.chunk().

  • [x] Closes #4055
  • [x] Tests added in test_dask.py
  • [x] Passes isort -rc . && black . && mypy . && flake8
  • [x] Updated whats-new.rst for changes
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4064/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
617476316 MDU6SXNzdWU2MTc0NzYzMTY= 4055 Automatic chunking of arrays ? AndrewILWilliams 56925856 closed 0     11 2020-05-13T14:02:41Z 2020-05-25T19:23:45Z 2020-05-25T19:23:45Z CONTRIBUTOR      

Hi there,

Hopefully this turns out to be a basic issue, but I was wondering why the chunks='auto' that dask seems to provide (https://docs.dask.org/en/latest/array-chunks.html#automatic-chunking) isn't an option for xarray? I'm not 100% sure of how dask decides how to automatically chunk its arrays, so maybe there's a compatibility issue?

I get the impression that the dask method automatically tries to prevent the issues of "too many chunks" or "too few chunks" which can sometimes happen when choosing chunk sizes automatically. If so, it would maybe be a useful thing to include in future versions?

Happy to be corrected if I've misunderstood something here though, still getting my head around how the dask/xarray compatibility really works...

Cheers!

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4055/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
568378007 MDU6SXNzdWU1NjgzNzgwMDc= 3784 Function for regressing/correlating multiple fields? AndrewILWilliams 56925856 closed 0     6 2020-02-20T15:24:14Z 2020-05-25T16:55:33Z 2020-05-25T16:55:33Z CONTRIBUTOR      

I came across this StackOverflow thread about applying linear regression across multi-dimensional arrays and there were some very efficient, xarray-based solutions suggested to the OP which leveraged vectorized operations. I was wondering if there was any interest in adding a function like this to future releases of xarray? It seems like a very neat and useful functionality to have, and not just for meteorological applications!

https://stackoverflow.com/questions/52108417/how-to-apply-linear-regression-to-every-pixel-in-a-large-multi-dimensional-array

Most answers draw from this blog post: https://hrishichandanpurkar.blogspot.com/2017/09/vectorized-functions-for-correlation.html

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3784/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "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 27.335ms · About: xarray-datasette