Skip to content

Improve alignment checks #10251

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

Merged
merged 8 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix CI
  • Loading branch information
dcherian committed Apr 26, 2025
commit fbf0af63e22551ebd766cb6600a1defc96b94264
6 changes: 3 additions & 3 deletions xarray/structure/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ def _get_dim_pos_indexers(
self,
matching_indexes: dict[MatchingIndexKey, Index],
) -> dict[Hashable, Any]:
dim_pos_indexers = {}
dim_index = {}
dim_pos_indexers: dict[Hashable, Any] = {}
dim_index: dict[Hashable, Index] = {}

for key, aligned_idx in self.aligned_indexes.items():
obj_idx = matching_indexes.get(key)
Expand Down Expand Up @@ -837,7 +837,7 @@ def align(
>>> a, b = xr.align(x, y, join="exact")
Traceback (most recent call last):
...
ValueError: cannot align objects with join='exact' ...
AlignmentError: cannot align objects with join='exact' ...

>>> a, b = xr.align(x, y, join="override")
>>> a
Expand Down
2 changes: 1 addition & 1 deletion xarray/structure/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ def merge(
>>> xr.merge([x, y, z], join="exact")
Traceback (most recent call last):
...
ValueError: cannot align objects with join='exact' where ...
AlignmentError: cannot align objects with join='exact' where ...

Raises
------
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy