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
After applying the concat function to a dataset with a Multiindex, a lot of functions related to indexing are broken. For example, it is not possible to apply reindex_like to itself anymore.
The error is raised in the alignment module. It seems that the function find_matching_indexes does not find indexes that belong to the same dimension.
What did you expect to happen?
I expected the alignment to be functional and that these basic functions work.
… new dimension (#6889)
* test: add unit test for #6881
* fix: harmonize multiindex objects when concat'ing along new dim
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update xarray/tests/test_concat.py
Co-authored-by: Benoit Bovy <[email protected]>
* fix: use directly imported concat function in test_concat
* test: fix level names in concat test function
* doc: add note to whats-new.rst
* Update doc/whats-new.rst
Co-authored-by: Benoit Bovy <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benoit Bovy <[email protected]>
What happened?
After applying the
concat
function to a dataset with a Multiindex, a lot of functions related to indexing are broken. For example, it is not possible to applyreindex_like
to itself anymore.The error is raised in the alignment module. It seems that the function
find_matching_indexes
does not find indexes that belong to the same dimension.What did you expect to happen?
I expected the alignment to be functional and that these basic functions work.
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
No response
Environment
INSTALLED VERSIONS
commit: None
python: 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 07:04:59) [GCC 10.3.0]
python-bits: 64
OS: Linux
OS-release: 5.15.0-41-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.12.1
libnetcdf: 4.8.1
xarray: 2022.6.0
pandas: 1.4.2
numpy: 1.21.6
scipy: 1.8.1
netCDF4: 1.6.0
pydap: None
h5netcdf: None
h5py: 3.6.0
Nio: None
zarr: None
cftime: 1.5.1.1
nc_time_axis: None
PseudoNetCDF: None
rasterio: 1.2.10
cfgrib: None
iris: None
bottleneck: 1.3.4
dask: 2022.6.1
distributed: 2022.6.1
matplotlib: 3.5.1
cartopy: 0.20.2
seaborn: 0.11.2
numbagg: None
fsspec: 2022.3.0
cupy: None
pint: None
sparse: 0.13.0
flox: None
numpy_groupies: None
setuptools: 61.2.0
pip: 22.1.2
conda: 4.13.0
pytest: 7.1.2
IPython: 7.33.0
sphinx: 5.0.2
/home/fabian/.miniconda3/lib/python3.10/site-packages/_distutils_hack/init.py:30: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
The text was updated successfully, but these errors were encountered: