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/issues/2227#issuecomment-1467929278,https://api.github.com/repos/pydata/xarray/issues/2227,1467929278,IC_kwDOAMm_X85XftK-,5637662,2023-03-14T11:32:10Z,2023-03-14T11:32:10Z,CONTRIBUTOR,"I see, they are not the same - the slow one is still a dask array, the other one is not:
```
Sn (r, theta, phi, sampling) float64 dask.array,
Sn (r, theta, phi, sampling) float64 nan nan nan nan ... nan nan nan
```
Otherwise they are the same, so this might be dask related ...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,331668890
https://github.com/pydata/xarray/issues/2227#issuecomment-1463894170,https://api.github.com/repos/pydata/xarray/issues/2227,1463894170,IC_kwDOAMm_X85XQUCa,5637662,2023-03-10T14:36:43Z,2023-03-10T14:36:43Z,CONTRIBUTOR,"I just changed
```
theisel = ds[k].isel(**slc, missing_dims=""ignore"")
```
to:
```
slcp = [slc[d] if d in slc else slice(None) for d in ds[k].dims]
theisel = ds[k].values[tuple(slcp)]
```
And that changed the runtime of my code from (unknown, still running after 3 hours) to around 10 seconds.
`ds[k]` is a 3 dimensional array
`slc[d]` are 7-d numpy array of integers","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,331668890