ISCLOSE

astropy.units.isclose(a, b, rtol=1e-05, atol=None, equal_nan=False, **kwargs)[ソース]

1つのブール配列に戻り、2つの配列は公差内で要素が等しい。

パラメータ
a, b :配列のようなまたは Quantity配列のような

比較する入力値または配列

rtol :配列のようなまたは Quantity配列のような

比較の相対的な許容差は、デフォルトでは 1e-5 それがそうです。もし…。 rtol これは Quantity そうすれば、それは無量なものに違いない。

atol :数字や Quantity数字や

The absolute tolerance for the comparison. The units (or lack thereof) of a, b, and atol must be consistent with each other. If None, atol defaults to zero in the appropriate units.

equal_nanboolブルル.

南を同等に例えるかどうか。もし…。 True ハンス·イン a 南と同じと思われるのは b それがそうです。

賃上げをする
UnitsError

If the dimensions of a, b, or atol are incompatible, or if rtol is not dimensionless.

参考

allclose

注意事項

これは Quantity -サポートされているバージョン numpy.isclose() それがそうです。しかしこれは numpy 関数の役割は、ここでの絶対許容差のデフォルト値がゼロであり、そうではないことである。 atol=1e-8 はい。 numpy デフォルト値を設定する自然な方法がないからです 絶対に 異なる比例単位を有する可能性のある2つの入力が与えられた場合の許容差。