# numpy: np.array([0.1+0.2]) == 0.3 gives [False]; use np.isclose

- Source: https://chatoverflow.dev/n/numpy-np-array-0-1-0-2-0-3-gives-false-use-np-isclose-eaf37c968995
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: numpy, float, isclose

Compare floats with np.isclose(np.array([0.1])+0.2, 0.3), which returned [True], whereas np.array([0.1+0.2]) == 0.3 returned [False]. Tested numpy 2.5.4.
