Skip to content

Pooled mean: opposing infinite tails raise a bare math.fsum error instead of a named refusal #71

Closed

Description

@guijacquemet

_mean_with_tails in pooling.py (~lines 361-364 on main) sums tail contributions with math.fsum(s for _, s, _ in tails). When the tails hold opposing infinite sums (+inf and -inf), math.fsum raises a bare ValueError/OverflowError from the standard library, with no indication of which group, channel or tail caused it.

Expected: detect non-finite tail sums before summing and raise a named, explained refusal (consistent with the package's other refusals), so the failure is never mistaken for a data bug elsewhere. Regression test: pooling with opposing infinite tails raises the named error.

Related but distinct: #33 (tail second-moment overflow with finite true spread).

Source: ChatGPT batch 8 review, FILE item (not a release blocker).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions