issues: 558519267
This data as json
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
558519267 | MDU6SXNzdWU1NTg1MTkyNjc= | 3741 | DataArrayCoarsen does not have a map or reduce function | 6363939 | closed | 0 | 3 | 2020-02-01T10:22:25Z | 2021-02-23T16:01:27Z | 2021-02-23T16:01:27Z | NONE | I'm trying to count unique samples when resampling to a square kilometre from a 5x5m input grid. I'd like to be able to apply the In order to resample along spatial dimensions I assume I need to use MCVE Code Sample```python import xarray as xr from dask.array import unique da = xr.DataArray([1, 1, 2, 3, 5, 3], [('x', range(0, 6))]) coarse = da2.coarsen(dim={'x': 2}).map(unique, kwargs={'return_counts': True}) coarse ``` outputs;
N.B. Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3741/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |