python np.linspace
2016-05-25 09:29
603 查看
该函数的形式为:
作用为:在规定的时间内,返回固定间隔的数据。他将返回“num”个等间距的样本,在区间[`start`, `stop`]中。其中,区间的结束端点可以被排除在外。
参数:
start : scalar
队列的开始值
stop : scalar
队列的结束值。当‘endpoint=False’时,不包含该点。在这种情况下,队列包含除了“num+1"以外的所有等间距的样本。
要注意的是,当‘endpoint=False’时,步长会发生改变。
num : int, optional
要生成的样本数。默认是50,必须要非负。
endpoint : bool, optional
如果是True,’stop'是最后的样本。否则,'stop'将不会被包含。默认为true
retstep : bool, optional
If True, return (`samples`, `step`), where `step` is the spacing between samples.
返回值:
samples : ndarray
在闭区间[start, stop]或者是半开区间[start, stop)中有num个等间距的样本
step : float
仅仅当”retstep=True“时候会返回。样本之间间距的大小
linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None)
作用为:在规定的时间内,返回固定间隔的数据。他将返回“num”个等间距的样本,在区间[`start`, `stop`]中。其中,区间的结束端点可以被排除在外。
参数:
start : scalar
队列的开始值
stop : scalar
队列的结束值。当‘endpoint=False’时,不包含该点。在这种情况下,队列包含除了“num+1"以外的所有等间距的样本。
要注意的是,当‘endpoint=False’时,步长会发生改变。
num : int, optional
要生成的样本数。默认是50,必须要非负。
endpoint : bool, optional
如果是True,’stop'是最后的样本。否则,'stop'将不会被包含。默认为true
retstep : bool, optional
If True, return (`samples`, `step`), where `step` is the spacing between samples.
返回值:
samples : ndarray
在闭区间[start, stop]或者是半开区间[start, stop)中有num个等间距的样本
step : float
仅仅当”retstep=True“时候会返回。样本之间间距的大小
相关文章推荐
- 一台电脑同时安装不同的python、django版本
- Python学习笔记-day0
- python实例
- Python的re模块正则表达式操作
- python learning_curve函数
- 调整python默认递归深度
- python 检测代码性能
- python中的深拷贝和浅拷贝理解
- 入门超简单python入门神图
- Virtualenv 快速上手指南
- Python轻量Web框架Flask使用
- Python入门-----介绍
- Python语法三
- python2.7下安装scrapy
- 用python记录运行pid,并在需要时kill掉它们
- Python解释器
- 飘逸的python - 使用dis模块进行代码层次的性能剖析
- Python built-in函数的源码实现定位
- Getting Started With Python Internals
- 4.python中的用户交互