if time_max < 0 or numpy.ceil(time_max) != time_max:
            raise ValueError('`time_max` must be a non-negative integer'