zoukankan      html  css  js  c++  java
  • python np.linspace

    该函数的形式为:

    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“时候会返回。样本之间间距的大小

  • 相关阅读:
    Linux系统安全及应用
    Linux 10 进程和计划的管理任务
    Centos netdata 的安装及配置
    Centos nmon安装及使用
    Python 各种数据类型的了解(上)
    神奇的循环知识
    Pathon的基础知识
    初次遇见Python
    操作系统与编程语言的简介
    计算机硬件基础
  • 原文地址:https://www.cnblogs.com/xiaohua92/p/5525871.html
Copyright © 2011-2022 走看看