Benoit Bovy

Results 452 comments of Benoit Bovy

> I saw there is also Pyright stage that seems to be always skipped. Has it been considered switching from MyPy to Pyright? Before that we'll need to do something...

That looks very cool indeed! (although I don't think that `rename_vars` is broken :) but instead some valid cases require skipping the default indexes invariant check).

Yes although I think it is easier to write rules for when these checks aren't needed. One example: skip the default indexes invariant test when the name of an existing...

It might be worth looking at the `._indexes` property of the datasets obtained after `rename_vars` and/or `swap_dims`. If it returns a dict with a "y" item that could be the...

Good catch. A possible fix would be ```python class Dataset(...): def swap_dims(self, ...): ... for current_name, current_variable in self.variables.items(): ... if current_name in result_dims: ... if current_name in self._indexes: indexes[current_name]...

To my knowledge it doesn't allow doing more than what we can do now with those other methods, it only adds some confusion :).

Ah yes probably, although not sure that `rename_dims` should be always chained with `set_xindex` and/or `drop_indexes` depending on the cases. I'd be in favor to just drop `swap_dims` (after deprecating...

I might miss the high-level picture here. I thought that `swap_dims` was mostly used as a workaround to (temporarily?) perform label-based operations (selection, alignment, etc) using another existing coordinate than...

I've tried re-implementing `swap_dims` it in terms of more atomic operations in #8911, but unfortunately it cannot handle the pandas multi-index special case. I think this cannot be easily done...

Yes I think we can safely remove this special case now. Selection on both single and multi-indexes used to be handled internally through the same function that was supporting only...