You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We now support dimensions without associated coordinate variables. So swap_dims() should be able to create new dimensions (e.g., z in this example) even if there isn't already a coordinate variable.
The text was updated successfully, but these errors were encountered:
I think rename_dims does something different: it renames a dimension if the new name does not exist (if it exists, it does something strange, see #3438), while swap_dims creates a new dimension and moves the old dimension to coords (or data_vars?).
we should, however, clearly define the use cases of swap_dims and rename_dims. Right now, the docs are not really clear on the difference between them.
Code Sample, a copy-pastable example if possible
Problem description
Currently this results in the error
KeyError: 'z'
Expected Output
We now support dimensions without associated coordinate variables. So
swap_dims()
should be able to create new dimensions (e.g.,z
in this example) even if there isn't already a coordinate variable.The text was updated successfully, but these errors were encountered: