When _shuffled_index and __getitem__ receive NumPy integer scalars, divmod propagates the NumPy types. Downstream modulo operations like (seed + epoch) % 2**32 can then fail with OverflowError: Python integer 4294967296 out of bounds for int32 if the scalar is np.int32 (or narrower) because Python delegates to the NumPy ufunc which attempts to coerce 2**32 into the scalar's precision. - #1366
Merged