issue_comments
4 rows where issue = 1345573285 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- Enable taking the mean of dask-backed cftime arrays · 4 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
1242718333 | https://github.com/pydata/xarray/pull/6940#issuecomment-1242718333 | https://api.github.com/repos/pydata/xarray/issues/6940 | IC_kwDOAMm_X85KEmB9 | spencerkclark 6628425 | 2022-09-10T12:28:16Z | 2022-09-10T12:28:16Z | MEMBER | Oops sorry I missed the merge conflict. Thanks @dcherian and @mathause. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable taking the mean of dask-backed cftime arrays 1345573285 | |
1222691662 | https://github.com/pydata/xarray/pull/6940#issuecomment-1222691662 | https://api.github.com/repos/pydata/xarray/issues/6940 | IC_kwDOAMm_X85I4MtO | spencerkclark 6628425 | 2022-08-22T17:38:22Z | 2022-08-22T17:38:22Z | MEMBER |
Thanks for noting this @dcherian. I wasn't sure if this was worth bumping our minimum version for, but since our policy allows for it, I'm happy to make that change. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable taking the mean of dask-backed cftime arrays 1345573285 | |
1222558754 | https://github.com/pydata/xarray/pull/6940#issuecomment-1222558754 | https://api.github.com/repos/pydata/xarray/issues/6940 | IC_kwDOAMm_X85I3sQi | dcherian 2448579 | 2022-08-22T15:58:42Z | 2022-08-22T15:58:42Z | MEMBER | Thanks @spencerkclark
It looks like we can bump to 2021.08.0 instead of dealing with this compatibility code. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable taking the mean of dask-backed cftime arrays 1345573285 | |
1221642349 | https://github.com/pydata/xarray/pull/6940#issuecomment-1221642349 | https://api.github.com/repos/pydata/xarray/issues/6940 | IC_kwDOAMm_X85I0Mht | spencerkclark 6628425 | 2022-08-21T23:24:06Z | 2022-08-21T23:24:06Z | MEMBER | Ah, this still didn't quite work for older dask versions: ``` ====================================================================================================== FAILURES ======================================================================================================= ___________________________________________________________________________________________ test_cftime_datetime_mean[True] ___________________________________________________________________________________________ dask = True @requires_cftime @pytest.mark.parametrize("dask", [False, True]) def test_cftime_datetime_mean(dask): if dask and not has_dask: pytest.skip("requires dask") times = cftime_range("2000", periods=4) da = DataArray(times, dims=["time"]) da_2d = DataArray(times.values.reshape(2, 2)) if dask: da = da.chunk({"time": 2}) da_2d = da_2d.chunk({"dim_0": 2}) expected = da.isel(time=0) # one compute needed to check the array contains cftime datetimes with raise_if_dask_computes(max_computes=1): > result = da.isel(time=0).mean() /Users/spencer/software/xarray/xarray/tests/test_duck_array_ops.py:342: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /Users/spencer/software/xarray/xarray/core/_reductions.py:1478: in mean return self.reduce( /Users/spencer/software/xarray/xarray/core/dataarray.py:2930: in reduce var = self.variable.reduce(func, dim, axis, keep_attrs, keepdims, **kwargs) /Users/spencer/software/xarray/xarray/core/variable.py:1854: in reduce data = func(self.data, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ array = dask.array<getitem, shape=(), dtype=object, chunksize=(), chunktype=numpy.ndarray>, axis = None, skipna = None, kwargs = {} _contains_cftime_datetimes = <function _contains_cftime_datetimes at 0x7fcdd91ce3a0>, offset = dask.array<where, shape=(), dtype=object, chunksize=(), chunktype=numpy.ndarray> timedeltas = dask.array<multiply, shape=(), dtype=float64, chunksize=(), chunktype=numpy.ndarray>, mean_timedeltas = dask.array<mean_agg-aggregate, shape=(), dtype=float64, chunksize=(), chunktype=numpy.ndarray> def mean(array, axis=None, skipna=None, **kwargs): """inhouse mean that can handle np.datetime64 or cftime.datetime dtypes""" from .common import _contains_cftime_datetimes array = asarray(array) if array.dtype.kind in "Mm": offset = _datetime_nanmin(array) # xarray always uses np.datetime64[ns] for np.datetime64 data dtype = "timedelta64[ns]" return ( _mean( datetime_to_numeric(array, offset), axis=axis, skipna=skipna, **kwargs ).astype(dtype) + offset ) elif _contains_cftime_datetimes(array): offset = min(array) timedeltas = datetime_to_numeric(array, offset, datetime_unit="us") mean_timedeltas = _mean(timedeltas, axis=axis, skipna=skipna, **kwargs) > return _to_pytimedelta(mean_timedeltas, unit="us") + offset E TypeError: unsupported operand type(s) for +: 'Array' and 'Array' /Users/spencer/software/xarray/xarray/core/duck_array_ops.py:573: TypeError ``` This appears to be the commit that fixed this issue in dask, meaning it should be fixed as of dask version 2021.07.0: ``` git bisect broken 626cc724ffa1d14cd74f48ff4f21ef443d832afa is the first fixed commit commit 626cc724ffa1d14cd74f48ff4f21ef443d832afa Author: Julia Signell jsignell@gmail.com Date: Tue Jun 29 11:50:36 2021 -0400
dask/array/core.py | 7 ++++++- dask/array/tests/test_gufunc.py | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable taking the mean of dask-backed cftime arrays 1345573285 |
Advanced export
JSON shape: default, array, newline-delimited, object
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]);
user 2