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/5983#issuecomment-969192355,https://api.github.com/repos/pydata/xarray/issues/5983,969192355,IC_kwDOAMm_X845xLOj,19226431,2021-11-15T18:23:57Z,2021-11-15T18:23:57Z,CONTRIBUTOR,"Not sure, but I'd argue to keep the `DataArray`-from-self-construction as I imagine many convenience cases where arrays maybe `DataArray`, numpy arrays or dask arrays, and one wants to ensure a `DataArray` type. Many other packages like pandas/numpy have that. Also the `xarray.Dataset` supports from-self-construction.
Perhaps it is better to raise an error when ambiguities occur? Meaning don't allowing to pass `attrs`, `coords` when data is an DataArray... ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052736383
https://github.com/pydata/xarray/issues/5983#issuecomment-969145579,https://api.github.com/repos/pydata/xarray/issues/5983,969145579,IC_kwDOAMm_X845w_zr,2448579,2021-11-15T17:33:05Z,2021-11-15T17:33:05Z,MEMBER,IMO we should raise an error asking the user to pass `da.data` instead,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052736383
https://github.com/pydata/xarray/issues/5983#issuecomment-969086661,https://api.github.com/repos/pydata/xarray/issues/5983,969086661,IC_kwDOAMm_X845wxbF,19226431,2021-11-15T16:31:11Z,2021-11-15T16:31:11Z,CONTRIBUTOR,"Ah yes, this is indeed ambiguous. On the other hand, as long it is still supported to create DataArray's from DataArray's they should at least preserve the data format. I need this as I am creating a subclass from the xarray.DataArray (see https://github.com/PyPSA/linopy/blob/8ac34d9fdbddc1fec0c7b4781f3d49e9c5ae064e/linopy/constraints.py#L18). In case I want to convert a lazy DataArray to my custom class the chunked data is directly computed, which seems a bit weird...
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052736383
https://github.com/pydata/xarray/issues/5983#issuecomment-969073542,https://api.github.com/repos/pydata/xarray/issues/5983,969073542,IC_kwDOAMm_X845wuOG,2448579,2021-11-15T16:17:35Z,2021-11-15T16:17:35Z,MEMBER,"Can you give us a little more context about why this might be useful? IIRC we disallowed creating dataarrays from dataarrays in some other place because it leads to ambiguous situations like the following
```
xr.DataArray(da, attrs={""a"": 1}) # does the result have da.attrs or the provided attrs?
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1052736383