BAM Engine 0.9.2 is a maintenance release that restores compatibility with NumPy 2.5, alongside validation and tooling fixes accumulated since 0.9.1.
NumPy 2.5 Compatibility#
NumPy 2.5 changed how NDArray[...] type annotations are introspected
internally. This caused custom roles registered via Simulation.use_role() to
silently receive float64 arrays for integer, boolean, and agent fields. BAM
Engine now resolves field dtypes correctly under both the old and new NumPy
layouts.
As part of the fix, use_role() now raises a clear TypeError when a field
annotation cannot be mapped to a NumPy dtype, instead of silently defaulting to
float64. Use Float, Int, Bool, Agent, or an explicit
NDArray[np.<scalar>] annotation.
Type checking with mypy also works again against NumPy 2.5’s updated stubs.
Other Fixes#
This release also bundles validation and robustness figure fixes (baseline target bounds, collapsed-seed statistics) and routine tooling updates.
See the release history for full details.
Upgrading#
pip install --upgrade bamengine