issue_comments
3 rows where author_association = "CONTRIBUTOR" and issue = 807089005 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- Sum and prod with min_count forces evaluation · 3 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
778341660 | https://github.com/pydata/xarray/issues/4898#issuecomment-778341660 | https://api.github.com/repos/pydata/xarray/issues/4898 | MDEyOklzc3VlQ29tbWVudDc3ODM0MTY2MA== | bcbnz 367900 | 2021-02-12T17:44:55Z | 2021-02-12T17:55:48Z | CONTRIBUTOR | @dcherian it looks like that works. A better test script: ```python import numpy as np import xarray as xr from xarray.tests import raise_if_dask_computes def worker(da): if da.shape == (0, 0): return da
np.random.seed(1023) da = xr.DataArray( np.random.normal(size=(20, 500)), dims=("x", "y"), coords=(np.arange(20), np.arange(500)), ) da = da.chunk(dict(x=5)) lazy = da.map_blocks(worker) with raise_if_dask_computes(): result = lazy.sum("x", skipna=True, min_count=5) result.load() assert np.isnan(result[0]) assert not np.isnan(result[6]) ``` If I then remove the
~~How would you suggest handling the possible type promotion from the current |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Sum and prod with min_count forces evaluation 807089005 | |
778329536 | https://github.com/pydata/xarray/issues/4898#issuecomment-778329536 | https://api.github.com/repos/pydata/xarray/issues/4898 | MDEyOklzc3VlQ29tbWVudDc3ODMyOTUzNg== | bcbnz 367900 | 2021-02-12T17:23:51Z | 2021-02-12T17:23:51Z | CONTRIBUTOR | A quick check with the debugger and it is the I think I've found another problem with ```python import numpy as np import xarray as xr def worker(da): if da.shape == (0, 0): return da
da = xr.DataArray( np.random.normal(size=(20, 500)), dims=("x", "y"), coords=(np.arange(20), np.arange(500)), ) da = da.chunk(dict(x=5)) lazy = da.map_blocks(worker) result_allaxes = lazy.sum(skipna=True, min_count=5) result_allaxes.load() ``` I would expect The problem seems to be the dtype check: The test returns True for float64 and so the block isn't run. Another MCVE: ```python import numpy as np from xarray.core import dtypes print(dtypes.NAT_TYPES) print(np.dtype("float64") in dtypes.NAT_TYPES) ``` Output:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Sum and prod with min_count forces evaluation 807089005 | |
778312719 | https://github.com/pydata/xarray/issues/4898#issuecomment-778312719 | https://api.github.com/repos/pydata/xarray/issues/4898 | MDEyOklzc3VlQ29tbWVudDc3ODMxMjcxOQ== | bcbnz 367900 | 2021-02-12T16:55:11Z | 2021-02-12T16:55:11Z | CONTRIBUTOR | grepping the code, the only other function that calls ```python import numpy as np import xarray as xr def worker(da): if da.shape == (0, 0): return da
da = xr.DataArray( np.random.normal(size=(20, 500)), dims=("x", "y"), coords=(np.arange(20), np.arange(500)), ) da = da.chunk(dict(x=5)) lazy = da.map_blocks(worker) result1 = lazy.prod("x", skipna=True) result2 = lazy.prod("x", skipna=True, min_count=5) ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Sum and prod with min_count forces evaluation 807089005 |
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 1