You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 663b383
Browse filesBrowse the repository at this point in the historyBrowse files
Fix invalid and lossy output of petab_math_str (#545)
Make `petab_math_str` produce valid PEtab math expressions that
round-trip, and use it when writing v2 condition and measurement tables.
`PetabStrPrinter` now:
* prints `&&`, `||`, `!`, `==`, `!=` instead of sympy's `&`, `|`, `~`,
`Eq(...)`, `Ne(...)`
* parenthesizes negative and non-integer rational bases of powers (`(-2)
^ x` was printed as `-2.0 ^ x`)
* prints n-ary `Min`/`Max` as nested binary `min`/`max`
* prints `pi` as its double value and `E` as `exp(1)`
* prints double-precision floats with the shortest exact representation
(`0.6666666666666666` instead of `0.666666666666667`), and
integer-valued floats as integers (`100*x` instead of `100.0*x`)
* raises for `Piecewise` without a default condition instead of dropping
the last condition
`ConditionTable.to_df` and `MeasurementTable.to_df` now use
`petab_math_str` instead of `str`, so expressions are written in PEtab
syntax and float values are not truncated.
Fixes#544.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments