Linspace auto detect end

Is there an existing pytorch function to generate n equally spaced items starting from x with interval of k without having to specify the end?

Eg.
n = 5, x = 1, k = 0.1 -> [1.0, 1.1, 1.2, 1.3, 1.4]
n = 5, x = 1, k = 2 -> [1, 3, 5, 7, 9]

So the end is determined by the interval (k) and number of items (n)

Is it not good enough to calculate the end from n, x and k and using the available function?

end = k*(n-1) + x

That’s okay. I only wanted to avoid extra calculations as much as possible, no matter how trivial it seems to calculate. But I guess for now, I cannot avoid it. Thanks