@staticmethod
    def _validate_dtype(dtype):
        if not (dtype is None or com.is_int64_dtype(dtype)):
            raise TypeError('Invalid to pass a non-int64 dtype to RangeIndex')
require dtype to be None or int64
dataset/ETHPy150Open pydata/pandas/pandas/indexes/range.py/RangeIndex._validate_dtype