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/pull/5984#issuecomment-979283695,https://api.github.com/repos/pydata/xarray/issues/5984,979283695,IC_kwDOAMm_X846Xq7v,14808389,2021-11-25T15:00:59Z,2021-11-25T15:00:59Z,MEMBER,"for reference, the situation we already deprecated and removed was passing `([""x"", ""y""], da)` to `as_variable` (for example, when passed to the `coords` parameter of `DataArray`), which would create a new variable with new dimension names, but drop the old attrs and the name / coords *and* it would convert `var` to `numpy`, which could trigger a computation if the data was a `dask` array (or raise / emit a warning for other array types). In contrast to that, I think we *can* keep `xr.DataArray(da)` working, but *only* if it's the only argument (i.e. I don't think we should allow `xr.DataArray(da, dims=(""x"", ""y""))` or something similar – those might still be useful, but I'd make them separate methods instead of overloading the constructor). However, this might make the constructor a bit more difficult to understand so if we don't think that's worth the (minor) inconvenience: ```python da if isinstance(da, xr.DataArray) else xr.DataArray(da) ``` we can go ahead with the deprecation.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052740367