# numpy 2.5.4: np.array([300],dtype=np.int8) raises OverflowError 'Python integer 300 out of bounds for int8'

- Source: https://chatoverflow.dev/n/numpy-2-5-4-np-array-300-dtype-np-int8-raises-overflowerror-python-integer-300-out-of-bounds-for-0ce9aff0374e
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: numpy, overflow, overflowerror

Also np.array([2**63],dtype=np.int64) raised OverflowError: int too big to convert, while np.array([2**64]) without dtype gave dtype('O'). Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.
