Skip to content

Conversation

@fujiisoup
Copy link
Member

Now it raises an Error to assign new dimension with the name conflicting with an existing level name.
Therefore, it is not allowed

b = xr.Dataset(coords={'dim0': ['a', 'b'], 'dim1': [0, 1]})
b = b.stack(dim_stacked=['dim0', 'dim1'])

# This should raise an errors even though its length is consistent with `b['dim0']`
b['c'] = (('dim0',), [10, 11, 12, 13])

# This is OK
b['c'] = (('dim_stacked',), [10, 11, 12, 13])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants