`petab_math_str` writes `nan` and `zoo`, which are not valid PEtab
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
從 petab.v1.math 模組開始,其中 petab_math_str 會將 sympy 運算式轉換回 PEtab 字串,並重現 issue 中的三次呼叫,以觀察 nan 和 zoo*x 的輸出。查看 sympify_petab 如何已經拒絕保留名稱 nan,讓新的檢查遵循相同的模式。完成標準是:對於包含 nan 或 zoo 的運算式,petab_math_str 擲出 ValueError,並且有測試涵蓋這兩種情況。
由索引模型根據 Issue 內容生成。
描述
NaN is not representable in PEtab (v2 spec: NUMERIC excludes NaN; math expressions: "neither is NaN (not-a-number)" supported; nan is a reserved keyword, "undefined in PEtab"). The same holds for sympy's complex infinity zoo.
Nevertheless, petab_math_str prints them, producing files that cannot be read:
import sympy as sp
from petab.v1.math import petab_math_str, sympify_petab
petab_math_str(sp.nan) # 'nan'
petab_math_str(sympify_petab("x / 0")) # 'zoo*x'
sympify_petab("nan") # ValueError: Use of reserved name 'nan'
petab_math_str should raise a ValueError for expressions containing nan or zoo, instead of silently writing invalid PEtab.
🤖 Drafted with AI assistance.
- 主要語言
- Python
- 星號
- 18
- 分支
- 9
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 21
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PEtab-dev/libpetab-python 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
PEtab-dev/libpetab-python#568 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 73/100
PEtab-dev/libpetab-python#566 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
PEtab-dev/libpetab-python#525 ·
維護者通常 1 天內回覆
-
Deprecation warnings with pandas 3.1 (`inplace`, `read_csv(float_precision=...)`)可能已有人在做 @dweindl 於 2 天前認領。 未關閉
PEtab-dev/libpetab-python#570 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
`petablint` fails for PEtab v2 problems with only warnings可能已有人在做 @dweindl 於 3 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 35/100
PEtab-dev/libpetab-python#567 ·
維護者通常 1 天內回覆
查看 PEtab-dev/libpetab-python 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 72/100
slavakurilyak/awesome-ai-agents#845 ·
維護者通常 1 天內回覆
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directory可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉difficulty:2 enhancement good first issue
難度 1/5 1-3 小時 新手友好度 92/100
MakazhanAlpamys/Soup#2178 ·
維護者通常 1 天內回覆
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-values未關閉
難度 2/5 1-3 小時 新手友好度 75/100
scverse/rapids-singlecell#854 ·
維護者通常 1 天內回覆
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGL可能已有人在做 @ninglinLiu 今天認領。 未關閉area:frontend backend:slang bug direction:input
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=False可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 13 天內回覆