Make hardwired tolerances configurable via a tol parameter (in units of eps)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start by auditing the package for literal tolerances and calls that rely on lower-level defaults, then trace how tolerance flows through base, SO3, SE3, and UnitQuaternion; the issue names UnitQuaternion.AngVec, SO3.AngleAxis, SE3.AngleAxis, and angvec2tr as examples. Add tol where a tolerance affects results, preserving current defaults and documenting it. Add a test for each changed function showing that tol takes effect.
由索引模型根據 Issue 內容生成。
描述
Summary
Any function that applies a hardwired numerical tolerance should expose it as a tol parameter, expressed in units of machine epsilon (eps), so that callers can tighten or loosen it for their application.
Convention
The base module already follows this pattern in places, for example unitvec, iszero, iszerovec, isunitvec and angvec2r: tol is a multiple of eps (default 20), and a quantity is treated as zero when abs(x) < tol * eps. This issue is to apply it consistently.
Scope
- Audit the package for literal tolerances (e.g.
1e-6,1e-12), and for calls that rely on the default tolerance of a lower-level function. - Where a tolerance affects the result, add a
tolparameter in units ofeps, with a default that preserves current behaviour, and document it in the docstring. - Where the tolerance is used deep inside a
basefunction, passtolthrough every intermediate function, so a caller of a high-level method such as anSO3orUnitQuaternionconstructor can still control it. This may require adding the parameter to several functions in a call chain.
Example
UnitQuaternion.AngVec (see #266) now tests the angle with smb.iszero(theta), which uses the default tolerance. A caller cannot change it. It should accept tol and pass it to iszero, and the same applies to SO3.AngleAxis, SE3.AngleAxis and angvec2tr, which call angvec2r (which already has tol, see #267) but do not expose it.
Notes
- Keep defaults unchanged so there is no behaviour change for existing code.
- Add a test per changed function showing that
toltakes effect.
🤖 Generated with Claude Code
- 主要語言
- Python
- 星號
- 648
- 分支
- 108
- 平均合併
- 9 天 19 小時
- 30 天內合併 PR
- 9
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rai-opensource/spatialmath-python 的其他 Issue
-
trlog2 loses the quadrant for valid SO(2) and SE(2) rotations可能已有人在做 @vera-rubin 於 6 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
rai-opensource/spatialmath-python#252 ·
維護者通常 1 天內回覆
-
documentation
難度 2/5 1-3 小時 新手友好度 74/100
rai-opensource/spatialmath-python#235 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 65/100
rai-opensource/spatialmath-python#32 · 4 則留言 ·
維護者通常 1 天內回覆
-
expand_dims(None) raises TypeError although None is its documented default可能已有人在做 @Doribelove 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 52/100
rai-opensource/spatialmath-python#261 ·
維護者通常 1 天內回覆
-
documentation enhancement
難度 5/5 一週以上 新手友好度 15/100
rai-opensource/spatialmath-python#257 · 1 則留言 ·
維護者通常 1 天內回覆
查看 rai-opensource/spatialmath-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 77/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
pgvector/pgvector-python#169 ·
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from git可能已有人在做 @MohabMohie 今天認領。 未關閉agentic
難度 2/5 1-3 小時 新手友好度 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 87/100
huggingface/smolagents#3045 ·
維護者通常 1 天內回覆