Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
浮動小数点数を比較するために、numpy または scipy モジュールに (Matlab のように) イプシロン定数はありますか?
np.finfoを使用できます
>>> import numpy as np >>> np.finfo(np.double).eps 2.2204460492503131e-16 >>> np.finfo(np.single).eps 1.1920929e-07