Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raises a ValueError for a confliction between dimension names and level names #2353

Merged
merged 3 commits into from
Aug 13, 2018

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