Skip to content

v1.104.2

Choose a tag to compare

@github-actions github-actions released this 10 Jun 12:59
cec3657

Fixed

  • ResultBool rejected NaN as a default or value even though NaN is the documented "missing"/unrecorded sentinel for result variables (see ResultFloat.__init__). ResultBool locks its bounds to [0, 1], and param validates a Parameter's default against its bounds whenever a subclass overrides it (and validates every value assignment). So ResultBool(default=float("nan")) raised must be at most 1, not nan the moment a subclass overrode the inherited Parameter, and assigning float("nan") at runtime to mark a sample missing raised the same — making the NaN "missing" sentinel that already works for ResultFloat unusable for ResultBool. ResultBool._validate_bounds now treats NaN as in-bounds, so result bools can use the same missing sentinel as ResultFloat while genuinely out-of-range values (e.g. 2.0) are still rejected. Added coverage in test/test_result_nan_default.py.
  • The ResultBool binomial standard error (REDUCE path in bench_result_base.py) divided p*(1-p) by the full repeat-dimension size while computing p with a skipna=True mean. Now that NaN is a valid "missing" repeat for ResultBool, those diverged and the SE was understated whenever a repeat was missing. The SE now divides by the per-cell count of valid (non-NaN) repeats. Added coverage in test/test_result_bool.py.