Skip to content

fix: scale divides by first value without zero guard - #98

Open
andrewwhitecdw wants to merge 2 commits into
NVIDIA:mainfrom
andrewwhitecdw:bugfix/table-0103ab27
Open

fix: scale divides by first value without zero guard#98
andrewwhitecdw wants to merge 2 commits into
NVIDIA:mainfrom
andrewwhitecdw:bugfix/table-0103ab27

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

Problem

fix: scale divides by first value without zero guard

Fix

Replace:

    slope, _ = np.polyfit(x, y, 1)
    return slope / values[0] + 1.0

with:

    slope, _ = np.polyfit(x, y, 1)
    if values[0] == 0:
        return 0.0
    return slope / values[0] + 1.0

Files changed

  • bobber/lib/analysis/table.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review July 28, 2026 00:37
Auditor: The guard returns 0.0 for a zero baseline, but this function computes a relative scale ratio (slope/first value + 1), so the undefined zero-baseline case should be NaN/raise, not a misleading finite scale. This silently changes semantics and lacks a regression test.
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.

1 participant