Skip to content

Triangle addition fails for triangles with the same columns, but different ordering. #667

@genedan

Description

@genedan

Are you on the latest chainladder version?

  • Yes, this bug occurs on the latest version.

Describe the bug in words

Discovered while working on #666. When you reorder a triangle's columns, you can't add it back to another triangle that is the same in every other way except for the ordering. This used to be a valid operation, since it's taken from the tutorial.

How can the bug be reproduced?

import chainladder as cl
s1 = cl.load_sample('clrd').iloc[:3]
s2 = s1.sort_index(ascending=False)
s3 = s1.iloc[:, ::-1]

s1 + s3
Image

What is the expected behavior?

The result should be:

np.True_

Metadata

Metadata

Assignees

Labels

Documentation 📚Changes to docstrings or the documentation site. No codebase changes.Effort > Brief 🐇Small tasks expected to take a few hours up to a couple of days.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions