Skip to content

Commit

Permalink
align key_labels with index
Browse files Browse the repository at this point in the history
  • Loading branch information
John Bogaardt committed May 28, 2024
1 parent 89ed26a commit 7e5dd10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chainladder/core/dunders.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def _prep_index(self, x, y):
# Broadcast to the triangle with a larger multi-index
kdims = x.kdims if len(x.key_labels) > len(y.key_labels) else y.kdims
y.kdims = x.kdims = kdims
key_labels = x.key_labels if len(x.key_labels) > len(y.key_labels) else y.key_labels
y.key_labels = x.key_labels = key_labels
return x, y
a, b = set(x.key_labels), set(y.key_labels)
common = a.intersection(b)
Expand Down

0 comments on commit 7e5dd10

Please sign in to comment.