Skip to content

Preserve input summaries when merging continuous verification scores - #581

Open
antonsoo wants to merge 2 commits into
pySTEPS:masterfrom
antonsoo:fix/continuous-score-merge-inputs
Open

antonsoo wants to merge 2 commits into
pySTEPS:masterfrom
antonsoo:fix/continuous-score-merge-inputs

Conversation

@antonsoo

Copy link
Copy Markdown

Merging continuous verification summaries currently changes the first input: the shallow dictionary copy still shares its NumPy arrays. Reusing those summaries for another aggregate then counts data twice. For example, merging two three-sample summaries changes the first summary's count to six; repeating the merge returns nine samples instead of six.

This deep-copies the first summary before updating its moments and counts. The second input remains read-only. Tests cover scalar, axis-wise and per-pixel summaries, repeated merges, reversed inputs and later accumulation into the merged result.

I also checked repeated aggregation of actual Finnish and Swiss radar forecast errors against direct NumPy population moments. All 144 checks that failed because of input mutation now pass, and the previously working controls are unchanged.

Validation: 804 tests pass in the full suite; both plugin tests pass when rerun after installing the missing pip dependency. One optional GDAL module is skipped. The focused tests and radar checks also pass on Python 3.11 / NumPy 1.26, and Black passes.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-24T03:05:16.572959Z 41ead68 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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