Try using dtype=np.int32 or np.intc, as this is what form supports. See for instance
dtype=np.int32
np.intc
and