np.linspace主要用来创建等差数列。
    np.linspace参数:

    1. numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0)
    2. Return evenly spaced numbers over a specified interval.
    3. (在startstop之间返回均匀间隔的数据)
    4. Returns num evenly spaced samples, calculated over the interval [start, stop].
    5. (返回的是 [start, stop]之间的均匀分布)
    6. The endpoint of the interval can optionally be excluded.
    7. Changed in version 1.16.0: Non-scalar start and stop are now supported.
    8. (可以选择是否排除间隔的终点)

    参数含义:

    1. start:返回样本数据开始点
    2. stop:返回样本数据结束点
    3. num:生成的样本数据量,默认为50
    4. endpointTrue则包含stopFalse则不包含stop
    5. retstepIf True, return (samples, step), where step is the spacing between samples.(即如果为True则结果会给出数据间隔)
    6. dtype:输出数组类型
    7. axis0(默认)或-1

    使用例子:

    1. >>> np.linspace(2.0, 3.0, num=5)
    2. array([ 2. , 2.25, 2.5 , 2.75, 3. ])
    3. >>> np.linspace(2.0, 3.0, num=5, endpoint=False)
    4. array([ 2. , 2.2, 2.4, 2.6, 2.8])
    5. >>> np.linspace(2.0, 3.0, num=5, retstep=True)
    6. (array([ 2. , 2.25, 2.5 , 2.75, 3. ]), 0.25)