numpy.linspace()知识大全

版权声明:创作不易,转载请留出处。 https://blog.csdn.net/qq_39072607/article/details/89323068

numpy.linsapce函数的作用

numpy.linsapce函数的作用是创建一个等差数列。

numpy.linspace函数用法

numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None)
start:序列的起点 scalar(标量)
stop: 序列的终点 scalar(标量)
num:生成的样本数 默认50 必须非负
endpoint:如果是真,样本包括stop,如果为False,样本不包括stop
retstep:若为假,返回等差数列;否则返回array([samples, step])。默认为假

猜你喜欢

转载自blog.csdn.net/qq_39072607/article/details/89323068
今日推荐