Skip to content

Conversation

@edoyango
Copy link
Collaborator

@edoyango edoyango commented Jan 9, 2026

This also fixes some issues with the join methods as they would fail to reverse the original split method.

The join fix is needed since the split onslice must keep
the dimension that it was split on e.g. if splitting
from (2, 3) into (2, 1), and (2, 2), the second dim must
be kept and the join should join again on that second
dim. Before, it was trying to join by creating a new dim
Fixes hsplit and vsplit calls as they require an indices_or_sections
argument. The value chosen is such that the number of arrays returned
is equal to the number of elements in the 0th and 1st dimensions for
vsplit and hsplit, respectively.
Also includes fix for the join method since
xr.merge would fail due to incompatible coords
after splitting.
Like numpy, concat is required to reverse the split.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 20839996018

Details

  • 99 of 99 (100.0%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.7%) to 65.644%

Totals Coverage Status
Change from base Build 20305027296: 0.7%
Covered Lines: 10649
Relevant Lines: 15856

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants