Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Make hardwired tolerances configurable via a tol parameter (in units of eps)

オープン
#268 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

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 の本文から書いたものです。

説明

enhancement

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 tol parameter in units of eps, with a default that preserves current behaviour, and document it in the docstring.
  • Where the tolerance is used deep inside a base function, pass tol through every intermediate function, so a caller of a high-level method such as an SO3 or UnitQuaternion constructor 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 tol takes effect.

🤖 Generated with Claude Code

主要言語
Python
スター
648
フォーク
108
平均マージ
9日 19時間
マージ済み PR(30日)
9

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rai-opensource/spatialmath-python のほかの issue

rai-opensource/spatialmath-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。