Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: fix backward compatibility of Substitution, missing function check #2522

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

mloubout
Copy link
Contributor

Fix backward compat that was applying weights to all derivative missing the coeff.function check

@mloubout mloubout added bug-py API api (symbolics, types, ...) labels Jan 21, 2025
Copy link
Contributor

@FabioLuporini FabioLuporini left a comment

Choose a reason for hiding this comment

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

GTG

@@ -307,7 +307,8 @@ def _xreplace(self, subs):
if self in subs:
new = subs.pop(self)
try:
return new._xreplace(subs)
new, flag = new._xreplace(subs)
return new, True
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: this was actually incorrectly returning False flag in lots of cases (since subs is then empy here) so new._xreplace(subs) would return new, False

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.32%. Comparing base (490a627) to head (01e478d).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2522   +/-   ##
=======================================
  Coverage   87.31%   87.32%           
=======================================
  Files         238      238           
  Lines       45810    45829   +19     
  Branches     4060     4060           
=======================================
+ Hits        40000    40020   +20     
+ Misses       5126     5125    -1     
  Partials      684      684           

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

@mloubout mloubout merged commit 8cec681 into master Jan 21, 2025
31 checks passed
@mloubout mloubout deleted the custom-coeff-backward-fix branch January 21, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API api (symbolics, types, ...) bug-py
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants