Skip to content

[BUG] cum_to_incr does not respect inplace #1481

Description

@henrydingliu

Are you on the latest chainladder version?

  • Yes, this bug occurs on the latest version.

Describe the bug in words

tri.cum_to_incr(inplace=True) does not mutate tri

How can the bug be reproduced?

_ = raa.cum_to_incr(True)
print(raa)
         12       24       36       48       60       72       84       96       108      120
1981  5012.0   8269.0  10907.0  11805.0  13539.0  16181.0  18009.0  18608.0  18662.0  18834.0
1982   106.0   4285.0   5396.0  10666.0  13782.0  15599.0  15496.0  16169.0  16704.0      NaN
1983  3410.0   8992.0  13873.0  16141.0  18735.0  22214.0  22863.0  23466.0      NaN      NaN
1984  5655.0  11555.0  15766.0  21266.0  23425.0  26083.0  27067.0      NaN      NaN      NaN
1985  1092.0   9565.0  15836.0  22169.0  25955.0  26180.0      NaN      NaN      NaN      NaN
1986  1513.0   6445.0  11702.0  12935.0  15852.0      NaN      NaN      NaN      NaN      NaN
1987   557.0   4020.0  10946.0  12314.0      NaN      NaN      NaN      NaN      NaN      NaN
1988  1351.0   6947.0  13112.0      NaN      NaN      NaN      NaN      NaN      NaN      NaN
1989  3133.0   5395.0      NaN      NaN      NaN      NaN      NaN      NaN      NaN      NaN
1990  2063.0      NaN      NaN      NaN      NaN      NaN      NaN      NaN      NaN      NaN

What is the expected behavior?

         12      24      36      48      60      72      84     96     108    120
1981  5012.0  3257.0  2638.0   898.0  1734.0  2642.0  1828.0  599.0   54.0  172.0
1982   106.0  4179.0  1111.0  5270.0  3116.0  1817.0  -103.0  673.0  535.0    NaN
1983  3410.0  5582.0  4881.0  2268.0  2594.0  3479.0   649.0  603.0    NaN    NaN
1984  5655.0  5900.0  4211.0  5500.0  2159.0  2658.0   984.0    NaN    NaN    NaN
1985  1092.0  8473.0  6271.0  6333.0  3786.0   225.0     NaN    NaN    NaN    NaN
1986  1513.0  4932.0  5257.0  1233.0  2917.0     NaN     NaN    NaN    NaN    NaN
1987   557.0  3463.0  6926.0  1368.0     NaN     NaN     NaN    NaN    NaN    NaN
1988  1351.0  5596.0  6165.0     NaN     NaN     NaN     NaN    NaN    NaN    NaN
1989  3133.0  2262.0     NaN     NaN     NaN     NaN     NaN    NaN    NaN    NaN
1990  2063.0     NaN     NaN     NaN     NaN     NaN     NaN    NaN    NaN    NaN

Would you be willing to contribute this ticket?

  • Yes, absolutely!
  • Yes, but I would like some help.
  • No.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Great First Contribution! 🌱Beginner friendly tickets with narrow scope and huge impact. Perfect to get your feet wet!

    Type

    Fields

    Priority

    Urgent

    Effort

    Low

    Scope

    Codebase

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions