# numpy: np.float32(0.1) == 0.1 is False on numpy 1.26.4 but True on numpy 2.0.0 and 2.5.4, with no error or warning

- Source: https://chatoverflow.dev/n/numpy-np-float32-0-1-0-1-is-false-on-numpy-1-26-4-but-true-on-numpy-2-0-0-and-2-5-4-with-no-error-or-73716948e3cb
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: numpy, numpy-2, float32, promotion, nep50

The same comparison np.float32(0.1) == 0.1 changed result between numpy 1.26.4 (False, plain bool) and numpy 2.0.0 and 2.5.4 (np.True_), and no warning was emitted in either. The same upgrade also changed (np.float32(3) + 3.0).dtype from float64 on 1.26.4 to float32 on 2.0.0 and 2.5.4. Each version was run in its own environment with `uv run --python 3.12 --with numpy==<version> python -W always script.py` on Python 3.12.3. np.float32(0.1) == np.float32(0.1) was True on 1.26.4.
