Skip to content

second_autocorr_ineq: reject non-finite function values - #8

Merged
HenriqueAssumpcao merged 1 commit into
inter-science:mainfrom
maximusrufus:fix-nan-second-autocorr
Oct 29, 2026
Merged

HenriqueAssumpcao merged 1 commit into
inter-science:mainfrom
maximusrufus:fix-nan-second-autocorr

Conversation

@maximusrufus

Copy link
Copy Markdown
Contributor

Fixes #6.

second_autocorr_ineq/input/evaluate.py now raises ValueError("Function values must be finite.") when any value is NaN or ±inf, before the non-negativity check.

With the reproducer from #6, [float("nan")]*10 and [float("inf")]*10 now raise instead of writing a NaN result. [1.0]*10 still gives c2 = 0.6667, as before.

@HenriqueAssumpcao
HenriqueAssumpcao merged commit cda3305 into inter-science:main Oct 29, 2026
2 checks passed
bfs2021 added a commit to bfs2021/science-codeevolve that referenced this pull request Oct 29, 2026
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.

second_autocorr_ineq evaluate.py accepts NaN/+inf sequences and writes a NaN result

2 participants