Boolean masks will not work on CSR sparse matrices. Please use:

            rsample_inlier_idx = np.arange(n_samples)[rsample_inlier_mask]
            rsample_inlier_X = X[rsample_inlier_idx]
            rsample_inlier_y = y[rsample_inlier_idx]