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/6377#issuecomment-1074025301,https://api.github.com/repos/pydata/xarray/issues/6377,1074025301,IC_kwDOAMm_X85ABFNV,5635139,2022-03-21T15:14:40Z,2022-03-21T15:14:40Z,MEMBER,"Nice find @dcherian . So it sounds like there's consensus around something like `replace_data` / `replace_values` / `update_values`. If you'd still be up for putting together a PR, I think that would be very welcome. You're right about `np.select` @Huite . The `np.searchsorted` solution looks v clever!","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1173497454 https://github.com/pydata/xarray/issues/6377#issuecomment-1073797708,https://api.github.com/repos/pydata/xarray/issues/6377,1073797708,IC_kwDOAMm_X85AANpM,2448579,2022-03-21T11:46:57Z,2022-03-21T11:46:57Z,MEMBER,See also #5048 though the discussion here is more thorough.,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1173497454 https://github.com/pydata/xarray/issues/6377#issuecomment-1072680183,https://api.github.com/repos/pydata/xarray/issues/6377,1072680183,IC_kwDOAMm_X84_78z3,5635139,2022-03-18T18:27:03Z,2022-03-18T18:27:03Z,MEMBER,"I agree this would be useful, and I've had to do similar things. It's the sort of area where pandas is stronger than xarray. We might want a more specific name than `replace`; something that confers it's replacing values? Particularly if the method is on a `Dataset` as well as a `DataArray`. @Huite thanks for the great proposal. Did you look at `np.select`? I think that might be faster than these and require less code.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1173497454