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/4682#issuecomment-743452370,https://api.github.com/repos/pydata/xarray/issues/4682,743452370,MDEyOklzc3VlQ29tbWVudDc0MzQ1MjM3MA==,14808389,2020-12-11T22:08:29Z,2020-12-12T23:09:11Z,MEMBER,"this also came up in #4141, where we proposed to work around this by using `DataArray.where` (as far as I can tell this doesn't work for you, though).
There are two issues here: first of all, by default `DataArray.__eq__` removes the attributes, so without calling `xr.set_options(keep_attrs=True)` `data == 1` won't keep the attributes (see also #3891).
However, even if we pass a `xarray` object with attributes, `xr.where` does not pass `keep_attrs` to `apply_ufunc`. Once it does the attributes will be propagated, but simply adding `keep_attrs=True` seems like a breaking change. Do we need to add a `keep_attrs` kwarg or get the value from `OPTIONS[""keep_attrs""]`?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,762385879