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/3955#issuecomment-1115275328,https://api.github.com/repos/pydata/xarray/issues/3955,1115275328,IC_kwDOAMm_X85CecBA,2448579,2022-05-02T19:25:42Z,2022-05-02T19:25:42Z,MEMBER,Closing as an upstream issue. We need either numpy to add support or for pandas extensionarrays to support the necssary protocols (#5287),"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,596352097 https://github.com/pydata/xarray/issues/3955#issuecomment-1114799000,https://api.github.com/repos/pydata/xarray/issues/3955,1114799000,IC_kwDOAMm_X85CcnuY,26384082,2022-05-02T12:37:50Z,2022-05-02T12:37:50Z,NONE,"In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the `stale` label; otherwise it will be marked as closed automatically ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,596352097 https://github.com/pydata/xarray/issues/3955#issuecomment-611321868,https://api.github.com/repos/pydata/xarray/issues/3955,611321868,MDEyOklzc3VlQ29tbWVudDYxMTMyMTg2OA==,1217238,2020-04-09T04:30:44Z,2020-04-09T04:30:55Z,MEMBER,"I would love to have support for integer NA values in xarray, but I don't think we want to build it into xarray. Ideally this would either be built into NumPy (i.e., with a custom dtype, which will require some work before its possible) or someone could build an ""integer with NA"" duckarray, which could implement the various NumPy protocols such as `__array_function__`. The later is a bit less elegant but could be done today with very few changes in xarray.","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,596352097 https://github.com/pydata/xarray/issues/3955#issuecomment-610808232,https://api.github.com/repos/pydata/xarray/issues/3955,610808232,MDEyOklzc3VlQ29tbWVudDYxMDgwODIzMg==,30388627,2020-04-08T07:51:41Z,2020-04-08T07:51:41Z,NONE,"@kmuehlbauer Thanks, Nice trick! It works well for this situation.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,596352097 https://github.com/pydata/xarray/issues/3955#issuecomment-610799451,https://api.github.com/repos/pydata/xarray/issues/3955,610799451,MDEyOklzc3VlQ29tbWVudDYxMDc5OTQ1MQ==,5821660,2020-04-08T07:31:26Z,2020-04-08T07:42:03Z,MEMBER,"There has been a lot of discussion about the int vs nan problem in the past, here one issue #1194. My question for xarray-devs would be too, if there is some idea on adapting to the pandas scheme? In the time being, you might just go the other way round (`isel` before `where`) and this little hack: ```python # overwrite fill_values with 0 sub = xr.where(z_indices == fill_value, 0, z_indices) # isel with sub and mask with where indexed_array = val_arr.isel(z=sub).where(z_indices != fill_value) ``` Update: Nevermind, this will make the `indexed_array` a float. You might use the same `where`-machinery and overwrite with a `fill_value ` of your liking: ```python # overwrite fill_values with 0 sub = xr.where(z_indices == fill_value, 0, z_indices) # isel with sub and mask with where indexed_array = val_arr.isel(z=sub) indexed_array = xr.where(z_indices == fill_value, fill_value, indexed_array) ``` I can't immediately see, but there might be a cleaner way to achieve this. ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,596352097