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/7076#issuecomment-1431645539,https://api.github.com/repos/pydata/xarray/issues/7076,1431645539,IC_kwDOAMm_X85VVS1j,2448579,2023-02-15T16:30:21Z,2023-02-15T16:30:21Z,MEMBER,"> the issue is when you do newds['z'] = stacked.z
Are we raising a warning here?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1384465119
https://github.com/pydata/xarray/issues/7076#issuecomment-1431496828,https://api.github.com/repos/pydata/xarray/issues/7076,1431496828,IC_kwDOAMm_X85VUuh8,4160723,2023-02-15T14:54:27Z,2023-02-15T14:54:27Z,MEMBER,"@ACHMartin the issue is when you do `newds['z'] = stacked.z`. In the last versions of Xarray multi-index levels have each their own (real) coordinates, for consistency and clarity we soon won't support assigning a multi-index to a single coordinate of a Dataset / DataArray like that.
I think that in other places we still do support it with a deprecation notice, but apparently in your example this is not the case. `unstack` doesn't work because the multi-index(es) and the coordinates of `newds` are not consistent.
I don't know exactly what is your real problem, but from now on you should avoid implicitly assign a multi-index with `xr_obj[""my_coord""] = ...` or `xr_obj.assign(my_coord=...)`. Instead you should re-create the multi-index, e.g., in your minimal example `newds = newds.set_index(z=[""across"", ""along""])`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1384465119
https://github.com/pydata/xarray/issues/7076#issuecomment-1257965977,https://api.github.com/repos/pydata/xarray/issues/7076,1257965977,IC_kwDOAMm_X85K-wmZ,4160723,2022-09-26T12:32:59Z,2022-09-26T12:32:59Z,MEMBER,"Hi @DWesl,
Your example is working with the `main` branch, it has been fixed in #6889.
```python
# after #6889
arr2.unstack(""index0"")
#
# array([[[ 0, 1, 2, 3, 4],
# [ 5, 6, 7, 8, 9],
# [10, 11, 12, 13, 14]],
#
# [[ 0, 1, 2, 3, 4],
# [ 5, 6, 7, 8, 9],
# [10, 11, 12, 13, 14]]])
# Coordinates:
# * level_0 (level_0) int64 0 1 2
# * level_1 (level_1) int64 0 1 2 3 4
# Dimensions without coordinates: index2
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1384465119