This behavior is deprecated:
in [3]: np.int32(2147483648)
<ipython-input-3-cd4bcbe47c5d>:1: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays. The conversion of 2147483648 to int32 will fail in the future.
For the old behavior, usually:
np.array(value).astype(dtype)
will give the desired result (the cast overflows).
np.int32(2147483648)
Out[3]: -2147483648
But this doesn't warn and probably should for consistency:
In [4]: np.int32('2147483648')
Out[4]: -2147483648