Skip to content

Fix ValueError in StructureFunction2DStack.calculate_modal_power - #37

Merged
richteague merged 1 commit into
masterfrom
fix-modal-power-unpack
Aug 18, 2026
Merged

richteague merged 1 commit into
masterfrom
fix-modal-power-unpack

Conversation

@richteague

Copy link
Copy Markdown
Collaborator

Summary

  • calculate_modal_power called fit_spiral expecting a 2-tuple return, but fit_spiral returns 3 values, causing a ValueError: too many values to unpack.
  • Unpack the third return value (discarded) so the call matches fit_spiral's actual signature.

Test plan

  • Existing test suite passes (pytest tests/)

calculate_modal_power unpacked two values from the stack's fit_spiral,
which returns three (popts, perrs, model_fns), so every call raised
"too many values to unpack (expected 2)". The method had no test
coverage and no in-repo caller, so the breakage went unnoticed when
fit_spiral gained its per-ring model_fns return.

Discard the third element; behaviour is otherwise unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@richteague
richteague merged commit a00a695 into master Aug 18, 2026
1 of 3 checks passed
@richteague
richteague deleted the fix-modal-power-unpack branch August 18, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Couldn't load reviewers.

Assignees

Couldn't load assignees.