Repository navigation
Add petab_symbol - #563
Merged
Merged
Add petab_symbol#563
petab_symbol#563Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #563 +/- ##
=======================================
Coverage 78.19% 78.20%
=======================================
Files 68 68
Lines 7842 7845 +3
Branches 1400 1400
=======================================
+ Hits 6132 6135 +3
Misses 1224 1224
Partials 486 486 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dweindl
marked this pull request as ready for review
October 20, 2026 06:16
Add `petab.v1.math.petab_symbol` (also available from `petab.v2.math`), which creates a sympy symbol with the same assumptions as the symbols created by `sympify_petab` (currently `real=True`). Use it in the parser and in `calculate`, instead of repeating `real=True`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
petab.v1.math.petab_symbol(name)(also available frompetab.v2.math), which creates a sympy symbol with the same assumptions as the symbols created bysympify_petab(currentlyreal=True).So far,
real=Truewas repeated wherever symbols are created to match parsed expressions. SymPy treats symbols with different assumptions as different symbols, so a mismatch makes, e.g., substitutions silently do nothing. The parser andcalculate(v1 and v2) now usepetab_symbol.🤖 Generated with Claude Code