Skip to content

#717#770

Merged
henrydingliu merged 44 commits into
experimentalfrom
#717
May 11, 2026
Merged

#717#770
henrydingliu merged 44 commits into
experimentalfrom
#717

Conversation

@henrydingliu
Copy link
Copy Markdown
Collaborator

@henrydingliu henrydingliu commented May 11, 2026

Summary of Changes

Related GitHub Issue(s)

Additional Context for Reviewers

  • I passed tests locally for both code (pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)

Note

Medium Risk
Touches core sparse-backend construction paths (Triangle init, slicing, arithmetic prep) and changes dependency constraints, which could affect numerical behavior or backend compatibility despite being largely mechanical.

Overview
Updates sparse-array handling to consistently use sparse.COO (and COO.nan) instead of relying on sp(...)-style constructors, including Triangle initialization, sparse .loc/.at mutation, arithmetic coercion, and utility helpers.

Refactors chainladder.utils.sparse into a lighter wrapper, adds targeted unit tests for array, where, and in-place floor, and bumps packaging metadata (version 0.9.2, tighter pandas minimum, add explicit numpy dependency) alongside documentation/PR-template updates and expanded docstring examples for deterministic IBNR methods (Benktander/BF/CapeCod/ExpectedLoss) and API docs.

Reviewed by Cursor Bugbot for commit c2c748c. Bugbot is set up for automated code reviews on this repo. Configure here.

genedan and others added 30 commits May 6, 2026 17:10
…nctions to sparse.COO, and keep module-level functions to sp.

Replaces xp() with xp.COO() to create sparse arrays when xp used to be callable and was used as a constructor.
Bumps [mistune](https://github.com/lepture/mistune) from 3.1.4 to 3.2.1.
- [Release notes](https://github.com/lepture/mistune/releases)
- [Changelog](https://github.com/lepture/mistune/blob/main/docs/changes.rst)
- [Commits](lepture/mistune@v3.1.4...v3.2.1)

---
updated-dependencies:
- dependency-name: mistune
  dependency-version: 3.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Build(deps): Bump mistune from 3.1.4 to 3.2.1
Enhance docstrings and examples for improved clarity for many estimators
kennethshsu and others added 14 commits May 8, 2026 18:03
Closes #757

The Adjustments section header in docs/library/api.md was a copy-paste
of the Workflow section. The :mod: link and .. automodule:: directive
both pointed at chainladder.workflow, so the rendered RTD page for
Adjustments hyperlinked to the Workflow module page.

The four classes listed under Adjustments (BootstrapODPSample,
BerquistSherman, Trend, ParallelogramOLF) all live in
chainladder.adjustments, which is the correct target.

Co-authored-by: Nick Kinney <nkinney06@gmail.com>
…p() (#761)

Per maintainer feedback on #758/#761: matplotlib is needed at runtime
for TriangleDisplay.heatmap() even though it isn't imported directly,
so it must remain a core dependency. Add an inline comment so future
contributors don't try to move it again.

Co-authored-by: Nick Kinney <nkinney06@gmail.com>
REFACTOR: Reorganize type hierarchy of sparse.py. Move array-level fu…
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.3 to 2.7.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.6.3...2.7.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.7.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Build(deps): Bump urllib3 from 2.6.3 to 2.7.0
@henrydingliu henrydingliu merged commit 6db382e into experimental May 11, 2026
15 checks passed
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c2c748c. Configure here.

else:
w2 = w.copy()
w2 = sp(data=w2.data, coords=w2.coords, fill_value=sp.nan, shape=w2.shape)
w2 = sp.COO(data=w2.data, coords=w2.coords, fill_value=sp.nan, shape=w2.shape)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incomplete refactor: sp.nan no longer exists

High Severity

The sparse module refactor changed sp from being the COO class to the sparse module. The old sp.nan attribute (set via sp.nan = np.array(...) when sp was COO) was correctly migrated to COO.nan, but weighted_regression.py still references sp.nan. Since the sparse module has no .nan attribute, this will raise an AttributeError at runtime when the OLS regression path is triggered with a sparse backend. All other files were updated to use sp.COO.nan or COO.nan.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c2c748c. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@genedan bugbot randomly found this. is this related to #739?

@kennethshsu kennethshsu deleted the #717 branch May 11, 2026 19:35
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.

5 participants