Skip to content

Conversation

@haeunhwangbo
Copy link
Contributor

@haeunhwangbo haeunhwangbo commented Feb 3, 2026

Fixes #1671

  • Ensure at-risk aggregation returns a Python scalar (avoids int(np.array([x])) failure in NumPy>=2.4).
  • Harden casting via np.asarray(...).item() for compatibility.
  • Add regression test for scalar compatibility.

Tested with:

  • Python 3.12.11 + NumPy 2.3.5
  • Python 3.12.11 + NumPy 2.4.1

@CamDavidsonPilon CamDavidsonPilon merged commit c21f8f8 into CamDavidsonPilon:master Feb 4, 2026
0 of 4 checks passed
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.

add_at_risk_counts Numpy 2.4.0 compatibility (TypeError: only 0-dimensional arrays can be converted to Python scalars)

2 participants