Update the docstring of linspace to make value increments computation easier to read.

PiperOrigin-RevId: 338689844
Change-Id: I302f64fa46969f02ecbfcc434c937ecddfd3a5d1
This commit is contained in:
A. Unique TensorFlower 2020-10-23 09:36:47 -07:00 committed by TensorFlower Gardener
parent 6bbe9adb45
commit 18874dfce1

View File

@ -114,8 +114,9 @@ def linspace_nd(start, stop, num, name=None, axis=0):
A sequence of `num` evenly-spaced values are generated beginning at `start`
along a given `axis`.
If `num > 1`, the values in the sequence increase by `stop - start / num - 1`,
so that the last one is exactly `stop`. If `num <= 0`, `ValueError` is raised.
If `num > 1`, the values in the sequence increase by
`(stop - start) / (num - 1)`, so that the last one is exactly `stop`.
If `num <= 0`, `ValueError` is raised.
Matches
[np.linspace](https://docs.scipy.org/doc/numpy/reference/generated/numpy.linspace.html)'s