issue_comments: 614445489
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/pydata/xarray/pull/3922#issuecomment-614445489 | https://api.github.com/repos/pydata/xarray/issues/3922 | 614445489 | MDEyOklzc3VlQ29tbWVudDYxNDQ0NTQ4OQ== | 5821660 | 2020-04-16T06:39:13Z | 2020-04-16T06:39:13Z | MEMBER | @shoyer Thanks for the hint. I'm currently experimenting with the different possibilities. non-dask:
The relevant code inside idxmin/idxmax: ```python This will run argmin or argmax.indx will be dask if array is daskindx = func(array, dim=dim, axis=None, keep_attrs=keep_attrs, skipna=skipna) separated out for debuggingwith the current test layout coords will not be dask since the array's coords are not daskcoords = array[dim] try to make dask of coords as per @shoyer's suggestionthe below fails silently, but cannot be forced even with trying todo something like dask.array.asarray(), this errors out with"Cannot assign to the .data attribute of dimension coordinate a.k.a IndexVariable 'x'"if isinstance(indx.data, dask_array_type): coords = coords.chunk({}) res = coords[(indx,)] ``` It seems that the map-blocks approach is the only one which seem to work throughout the tests, but one. It fails with array set as array.astype("object") in the test fixture. Reason: dask gets computed within argmin/argmax. I'll revert to the map-blocks now and add the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
591101988 |