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

Clarify role of precision when specifying floats to `subspace`

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
documentation

調査の方向性

まず subspace の docstring とチュートリアルを見つけ、次に座標の照合に float データ値を受け取る他のメソッドを調査します。精度上のリスクを文書化し、issue に基づく警告例とともに isclose を推奨します。関連する docstring とチュートリアルで丸めの不一致を避ける方法が説明されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

From #799 we have seen that specifying a float data value to reference a coordinate value to a method that attempts to match it to some data in the (meta)data, such as subspace, may fail due to the natural unreliability of floating point precision due to rounding, e.g where matching to 0.123 fails but cf.isclose(0.123) will pass.

This isn't covered at all in the documentation, but can mean that users get unexpected results, like with that issue. So it is important to advertise that it is safest to use methods such as isclose when specifying float values if there is reasonable chance for rounding mismatch.

I recommend we clarify this, in (at least) two locations:

  • in the docstrings of methods where float data values can be provided, which is at least subspace but perhaps includes other methods (to be investigated);
  • in the tutorial, as (I am thinking) a warning box with an example higlighting an example such as that from the linked Issue.
主要言語
Python
スター
151
フォーク
23
平均マージ
21時間 29分
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

NCAS-CMS/cf-python のほかの issue

NCAS-CMS/cf-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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