MCPcopy
hub / github.com/pydata/xarray / align

Method align

xarray/structure/alignment.py:650–667  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

648 )
649
650 def align(self) -> None:
651 if not self.indexes and len(self.objects) == 1:
652 # fast path for the trivial case
653 (obj,) = self.objects
654 self.results = (obj.copy(deep=self.copy),)
655 return
656
657 self.find_matching_indexes()
658 self.find_matching_unindexed_dims()
659 self.align_indexes()
660 self.assert_unindexed_dim_sizes_equal()
661
662 if self.join == "override":
663 self.override_indexes()
664 elif self.join == "exact" and not self.copy:
665 self.results = self.objects
666 else:
667 self.reindex_all()
668
669
670T_Obj1 = TypeVar("T_Obj1", bound="Alignable")

Callers 15

alignFunction · 0.95
reindexFunction · 0.95
time_already_alignedMethod · 0.80
time_not_alignedMethod · 0.80
test_align_exactMethod · 0.80
test_align_overrideMethod · 0.80
test_align_str_dtypeMethod · 0.80

Calls 7

find_matching_indexesMethod · 0.95
align_indexesMethod · 0.95
override_indexesMethod · 0.95
reindex_allMethod · 0.95
copyMethod · 0.45