home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where author_association = "MEMBER", issue = 638909879 and user = 6815844 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 1

  • fujiisoup · 10 ✖

issue 1

  • Implement interp for interpolating between chunks of data (dask) · 10 ✖

author_association 1

  • MEMBER · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
674321185 https://github.com/pydata/xarray/pull/4155#issuecomment-674321185 https://api.github.com/repos/pydata/xarray/issues/4155 MDEyOklzc3VlQ29tbWVudDY3NDMyMTE4NQ== fujiisoup 6815844 2020-08-15T00:30:21Z 2020-08-15T00:30:21Z MEMBER

@cyhsu Yes, because it is not yet released. (I'm not sure when the next release will be, but maybe a few months later) If you do pip install git+https://github.com/pydata/xarray, the current master will be installed in your system and interpolation over the chunks can be used. But note that this means you will install (a kind of) beta version.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
  Implement interp for interpolating between chunks of data (dask) 638909879
674305570 https://github.com/pydata/xarray/pull/4155#issuecomment-674305570 https://api.github.com/repos/pydata/xarray/issues/4155 MDEyOklzc3VlQ29tbWVudDY3NDMwNTU3MA== fujiisoup 6815844 2020-08-14T23:07:03Z 2020-08-14T23:07:03Z MEMBER

@cyhsu Yes, in the current master.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement interp for interpolating between chunks of data (dask) 638909879
672348216 https://github.com/pydata/xarray/pull/4155#issuecomment-672348216 https://api.github.com/repos/pydata/xarray/issues/4155 MDEyOklzc3VlQ29tbWVudDY3MjM0ODIxNg== fujiisoup 6815844 2020-08-11T23:16:07Z 2020-08-11T23:16:07Z MEMBER

Thanks @pums974 :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement interp for interpolating between chunks of data (dask) 638909879
667412134 https://github.com/pydata/xarray/pull/4155#issuecomment-667412134 https://api.github.com/repos/pydata/xarray/issues/4155 MDEyOklzc3VlQ29tbWVudDY2NzQxMjEzNA== fujiisoup 6815844 2020-07-31T22:28:07Z 2020-07-31T22:28:07Z MEMBER

This PR looks good for me. Maybe we can wait for a few days in case anyone has some comments on it. If no comments, I'll merge this then.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement interp for interpolating between chunks of data (dask) 638909879
666720655 https://github.com/pydata/xarray/pull/4155#issuecomment-666720655 https://api.github.com/repos/pydata/xarray/issues/4155 MDEyOklzc3VlQ29tbWVudDY2NjcyMDY1NQ== fujiisoup 6815844 2020-07-30T21:38:55Z 2020-07-30T21:38:55Z MEMBER

OK. If you have additional time, it would be nicer if you could add more comments on tests, like what is being tested there ;)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement interp for interpolating between chunks of data (dask) 638909879
663788117 https://github.com/pydata/xarray/pull/4155#issuecomment-663788117 https://api.github.com/repos/pydata/xarray/issues/4155 MDEyOklzc3VlQ29tbWVudDY2Mzc4ODExNw== fujiisoup 6815844 2020-07-25T01:08:52Z 2020-07-25T01:08:52Z MEMBER

Thanks @pums974 for this update and sorry for my late response. It looks good but I'll take a deeper look in the next week.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement interp for interpolating between chunks of data (dask) 638909879
651589183 https://github.com/pydata/xarray/pull/4155#issuecomment-651589183 https://api.github.com/repos/pydata/xarray/issues/4155 MDEyOklzc3VlQ29tbWVudDY1MTU4OTE4Mw== fujiisoup 6815844 2020-06-30T07:01:31Z 2020-06-30T07:01:31Z MEMBER

Hum, ok, but I don't see how it would work if all points are between chunks (see my second example)

Maybe we can support sequential interpolation only at this moment. In this case, python res = data.interp(x=np.linspace(0, 1), y=0.5) can be interpreted as python res = data.interp(x=np.linspace(0, 1)).interp(y=0.5) which might not be too difficult.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement interp for interpolating between chunks of data (dask) 638909879
650428037 https://github.com/pydata/xarray/pull/4155#issuecomment-650428037 https://api.github.com/repos/pydata/xarray/issues/4155 MDEyOklzc3VlQ29tbWVudDY1MDQyODAzNw== fujiisoup 6815844 2020-06-26T22:17:22Z 2020-06-26T22:17:22Z MEMBER

As for implementing this in dask, you may be right, it probably belong there, But I am even less use to their code base, and have no clue where to put it.

OK. Even so, I would suggest restructuring the code base; maybe we can add an interp1d equivalence into core.dask_array_ops.interp1d which works with dask-arrays (non-xarray object). It'll be easier to test. The API should be the as same with scipy.interp.interp1d as possible.

In missing.py, we can call this function.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement interp for interpolating between chunks of data (dask) 638909879
649836609 https://github.com/pydata/xarray/pull/4155#issuecomment-649836609 https://api.github.com/repos/pydata/xarray/issues/4155 MDEyOklzc3VlQ29tbWVudDY0OTgzNjYwOQ== fujiisoup 6815844 2020-06-25T21:53:36Z 2020-06-25T21:53:36Z MEMBER

Also in my local environment, it gives AttributeError: 'memoryview' object has no attribute 'dtype'

The full stack trace is ``` _________ test_interpolate_1d[1-y-cubic] ____________

method = 'cubic', dim = 'y', case = 1

@pytest.mark.parametrize("method", ["linear", "cubic"])
@pytest.mark.parametrize("dim", ["x", "y"])
@pytest.mark.parametrize("case", [0, 1])
def test_interpolate_1d(method, dim, case):
    if not has_scipy:
        pytest.skip("scipy is not installed.")

    if not has_dask and case in [1]:
        pytest.skip("dask is not installed in the environment.")

    da = get_example_data(case)
    xdest = np.linspace(0.0, 0.9, 80)

    actual = da.interp(method=method, **{dim: xdest})

    # scipy interpolation for the reference
    def func(obj, new_x):
        return scipy.interpolate.interp1d(
            da[dim],
            obj.data,
            axis=obj.get_axis_num(dim),
            bounds_error=False,
            fill_value=np.nan,
            kind=method,
        )(new_x)

    if dim == "x":
        coords = {"x": xdest, "y": da["y"], "x2": ("x", func(da["x2"], xdest))}
    else:  # y
        coords = {"x": da["x"], "y": xdest, "x2": da["x2"]}

    expected = xr.DataArray(func(da, xdest), dims=["x", "y"], coords=coords)
  assert_allclose(actual, expected)

xarray/tests/test_interp.py:86:


xarray/testing.py:132: in compat_variable return a.dims == b.dims and (a._data is b._data or equiv(a.data, b.data)) xarray/testing.py:31: in _data_allclose_or_equiv return duck_array_ops.allclose_or_equiv(arr1, arr2, rtol=rtol, atol=atol) xarray/core/duck_array_ops.py:221: in allclose_or_equiv arr1 = np.array(arr1) ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/array/core.py:1314: in array x = self.compute() ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/base.py:165: in compute (result,) = compute(self, traverse=False, kwargs) ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/base.py:436: in compute results = schedule(dsk, keys, kwargs) ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/local.py:527: in get_sync return get_async(apply_sync, 1, dsk, keys, kwargs) ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/local.py:494: in get_async fire_task() ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/local.py:466: in fire_task callback=queue.put, ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/local.py:516: in apply_sync res = func(*args, kwds) ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/local.py:227: in execute_task result = pack_exception(e, dumps) ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/local.py:222: in execute_task result = _execute_task(task, data) ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/core.py:119: in _execute_task return func(args2) ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/optimization.py:982: in call return core.get(self.dsk, self.outkey, dict(zip(self.inkeys, args))) ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/core.py:149: in get result = _execute_task(task, cache) ../../../anaconda3/envs/xarray/lib/python3.7/site-packages/dask/core.py:119: in _execute_task return func(args2) xarray/core/missing.py:830: in _dask_aware_interpnd return _interpnd(var, old_x, new_x, func, kwargs) xarray/core/missing.py:793: in _interpnd x, new_x = _floatize_x(x, new_x) xarray/core/missing.py:577: in _floatize_x if _contains_datetime_like_objects(x[i]): xarray/core/common.py:1595: in _contains_datetime_like_objects return is_np_datetime_like(var.dtype) or contains_cftime_datetimes(var) xarray/core/common.py:1588: in contains_cftime_datetimes return _contains_cftime_datetimes(var.data)


array = <memory at 0x7f771d6daef0>

def _contains_cftime_datetimes(array) -> bool:
    """Check if an array contains cftime.datetime objects
    """
    try:
        from cftime import datetime as cftime_datetime
    except ImportError:
        return False
    else:
      if array.dtype == np.dtype("O") and array.size > 0:

E AttributeError: 'memoryview' object has no attribute 'dtype'

xarray/core/common.py:1574: AttributeError ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement interp for interpolating between chunks of data (dask) 638909879
649827797 https://github.com/pydata/xarray/pull/4155#issuecomment-649827797 https://api.github.com/repos/pydata/xarray/issues/4155 MDEyOklzc3VlQ29tbWVudDY0OTgyNzc5Nw== fujiisoup 6815844 2020-06-25T21:30:17Z 2020-06-25T21:30:17Z MEMBER

Hi @pums974

Thanks for sending the PR. I'm working to review it, but it may take more time.

A few comments; Does it work with an unsorted destination? e.g., python da.interp(y=[0, -1, 2])

I'm feeling that the basic algorithm, such as np.interp-equivalence, should be interpreted in upstream. I'm sure Dask community welcomes this addition. Do you have an interest on it?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Implement interp for interpolating between chunks of data (dask) 638909879

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 39.605ms · About: xarray-datasette