Reject boolean fallback clutter intensity in DP births - #5366
Conversation
|
Closing as redundant with #5365, which independently fixes the same existing ellipsoidal SPD-validation regression and was opened first. Keeping one focused PR avoids duplicate review/CI noise. |
✅MegaLinter analysis: Success
Notices
See detailed reports in MegaLinter artifacts Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining
|
8bdf893 to
c8cbb95
Compare
|
Update after the earlier duplicate-close note: I removed the ellipsoid change entirely because #5365 already covers it. This PR has been repurposed to an independent regression found in the same CI triage. The current head ( |

Summary
Fix a validation bug in
DirichletProcessBirthMultiBernoulliTrackerwhere the fallbackclutter_intensityaccepted boolean values.The fallback path called
_get_clutter_intensity(...)before semantic validation. That helper converts scalar-like inputs withfloat(...), soTruebecame1.0; the later_as_finite_real_scalar(...)check could no longer tell that the original configuration was boolean.Validate boolean dtype before that lossy conversion, then keep the existing finite/non-negative scalar validation unchanged. Numeric scalar and one-element numeric intensity inputs retain their current behavior.
Regression evidence
The existing regression already captures the bug:
tests/filters/test_dirichlet_process_birth_decision_validation.py::test_rejects_invalid_fallback_clutter_intensity[True]In the current NumPy 3.13 CI artifact, this is one of the remaining failures:
Truedoes not raise although the API requiresclutter_intensityto be finite, non-negative, and semantically numeric.Scope
One validation change in
src/pyrecest/filters/dirichlet_process_birth_tracker.py; no unrelated estimator behavior is changed.