Skip to content

Conversation

benbovy
Copy link
Member

@benbovy benbovy commented Jul 9, 2025

Hot fix for xarray-contrib/xarray-indexes#25 (comment)

The reason it breaks there is because PandasIndex.create_variables() relies on the wrapped pandas index (self.index) name property to set the name of the returned coordinate variable. That property is set by default from the dim dimension name in PandasIndex.__init__(), and is renamed in PandasIndex.from_variables() after calling the constructor. PandasIndex subclasses that re-implement .from_variables() may miss the last step, which now triggers an error with #10503.

@benbovy
Copy link
Member Author

benbovy commented Jul 9, 2025

This hot fix breaks other valid use cases like set_index.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant