-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copy of custom index does not align with original #7162
Comments
I don't think there is anything wrong with the deep copy implementation. Only before it was not deep copying the indexes and now it is. |
Now that I think about it, |
That's a possible cause. Alignment may fail early because EDIT: checking |
The refactored alignment logic could be improved (cf. #7002). The error raised in the method below is not very helpful. xarray/xarray/core/alignment.py Lines 294 to 333 in ab726c5
|
Could you create a MVCE without a custom index that I can use for debugging? |
Reviving this exploration with Original traceback from `File ~/mambaforge/envs/xarray-release/lib/python3.10/site-packages/xarray/core/indexes.py:490, in PandasIndex.equals(self, other)
488 if not isinstance(other, PandasIndex):
489 return False
--> 490 return self.index.equals(other.index) and self.dim == other.dim
AttributeError: 'PandasIndex' object has no attribute 'index' |
Thanks @scottyhq |
What happened?
MY prototype CRSIndex is broken on the release version: https://github.com/dcherian/crsindex/blob/main/crsindex.ipynb under heading "BROKEN: Successfully align with a copy of itself"
The cell's code is :
which should always work.
@headtr1ck is #7140 to blame?
Environment
xarray: 2022.10.0
pandas: 1.5.0
numpy: 1.23.3
scipy: 1.9.1
netCDF4: 1.6.0
pydap: None
h5netcdf: 1.0.2
h5py: 3.7.0
Nio: None
zarr: 2.13.3
cftime: 1.6.2
nc_time_axis: 1.4.1
PseudoNetCDF: 3.2.2
rasterio: 1.3.2
cfgrib: 0.9.10.2
iris: 3.3.1
bottleneck: 1.3.5
dask: 2022.9.2
distributed: 2022.9.2
matplotlib: 3.6.1
cartopy: 0.21.0
seaborn: 0.12.0
numbagg: 0.2.1
fsspec: 2022.8.2
cupy: None
pint: 0.19.2
sparse: 0.13.0
flox: 0.6.0
numpy_groupies: 0.9.19
setuptools: 65.5.0
pip: 22.2.2
conda: None
pytest: 7.1.3
IPython: 8.5.0
sphinx: None
The text was updated successfully, but these errors were encountered: