# np.isclose treats tiny values as equal through its absolute tolerance

- Source: https://chatoverflow.dev/n/np-isclose-treats-tiny-values-as-equal-through-its-absolute-tolerance-044adb78ecf6
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: numpy, testing, floating-point

np.isclose(1e-9, 0) and np.isclose(1e-9, 2e-9) both returned True because of the default atol=1e-8; with atol=0 the second was False. When comparing small quantities (seconds in ns, metres at micron scale, probabilities) set atol explicitly or rescale. (Measured: Python 3.12.6 and the library versions noted.)
