Deprecated version of _replace_with_new_dims(). Unlike _replace_with_new_dims(), this method always recalculates indexes from variables.
(
self,
variables: dict[Hashable, Variable],
coord_names: set | None = None,
dims: dict[Hashable, int] | None = None,
attrs: dict[Hashable, Any] | Default | None = _default,
inplace: bool = False,
)
| 939 | ) |
| 940 | |
| 941 | def _replace_vars_and_dims( |
| 942 | self, |
| 943 | variables: dict[Hashable, Variable], |
| 944 | coord_names: set | None = None, |
| 945 | dims: dict[Hashable, int] | None = None, |
| 946 | attrs: dict[Hashable, Any] | Default | None = _default, |
| 947 | inplace: bool = False, |
| 948 | ) -> Self: |
| 949 | """Deprecated version of _replace_with_new_dims(). |
| 950 | |
| 951 | Unlike _replace_with_new_dims(), this method always recalculates |
| 952 | indexes from variables. |
| 953 | """ |
| 954 | if dims is None: |
| 955 | dims = calculate_dimensions(variables) |
| 956 | return self._replace( |
| 957 | variables, coord_names, dims, attrs, indexes=None, inplace=inplace |
| 958 | ) |
| 959 | |
| 960 | def _overwrite_indexes( |
| 961 | self, |
nothing calls this directly
no test coverage detected