issues: 596352097
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
596352097 | MDU6SXNzdWU1OTYzNTIwOTc= | 3955 | Masking and preserving int type | 30388627 | closed | 0 | 5 | 2020-04-08T06:56:26Z | 2022-05-02T19:25:42Z | 2022-05-02T19:25:42Z | NONE | When DataArray is masked by But, if we need to use the DataArray ouput from MCVE Code Sample```python import numpy as np import xarray as xr val_arr = xr.DataArray(np.arange(27).reshape(3, 3, 3), dims=['z', 'y', 'x']) z_indices = xr.DataArray(np.array([[1, 0, 2], [0, 0, 1], [-2222, 0, 1]]), dims=['y', 'x']) fill_value = -2222 sub = z_indices.where(z_indices != fill_value) indexed_array = val_arr.isel(z=sub) ``` Expected Output
Problem Description
Currently, pandas supports NaN values. Is this possible for xarray? or another method around? |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3955/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0 } |
completed | 13221727 | issue |