Skip to content

Conversation

martinjrobins
Copy link
Contributor

@martinjrobins martinjrobins commented Jul 7, 2025

Description

This fixes an inconsistency in the shape of the value and sensitivities of a discrete time sum or explicit time integral depending on if output_variables was set or not

Ran into a bug in the sensitivity calculation if the variable was sparse, this might be related to #5058. I've added an explicit check to see if the variable is sparse, and the solver will raise an error if you try to calculate sensitivities of the sparse variable.

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #)

Important checks:

Please confirm the following before marking the PR as ready for review:

  • No style issues: nox -s pre-commit
  • All tests pass: nox -s tests
  • The documentation builds: nox -s doctests
  • Code is commented for hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@martinjrobins martinjrobins requested a review from a team as a code owner July 7, 2025 13:15
Copy link

codecov bot commented Jul 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.09%. Comparing base (6b05386) to head (99d9397).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5098      +/-   ##
===========================================
- Coverage    99.10%   99.09%   -0.01%     
===========================================
  Files          307      307              
  Lines        23686    23691       +5     
===========================================
+ Hits         23473    23477       +4     
- Misses         213      214       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@MarcBerliner MarcBerliner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MarcBerliner MarcBerliner enabled auto-merge (squash) July 11, 2025 17:42
@MarcBerliner MarcBerliner merged commit e48cbba into develop Jul 11, 2025
20 of 21 checks passed
@MarcBerliner MarcBerliner deleted the bug-sens-shape-consistency branch July 11, 2025 18:07
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.

2 participants