numpy.linspace
numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0)
返回指定间隔内的等间隔数字。
间隔的端点可以选择性地排除。
Parameters(参数) :
start : array_like | 序列的起始值。 |
---|---|
stop : array_like | 序列的结束值,除非endpoint被设置为False。在这种情况下,该序列包括所有除num + 1上均匀间隔的样本外的样本,因此排除了stop。当endpoint为False时,注意步长会改变。 |
num : int,可选 | 生成的样本数,默认是50。必须是非负。 |
endpoint : bool,可选 | 如果是True,则stop是最后一个样本,否则不包括在内。默认为True。 |
retstep : bool,可选 | 如果是True,返回(samples, step),其中s |