Python np.linspace

Source: Internet
Author: User

The function is in the form of:

Linspace (Start, Stop, num=50, Endpoint=true, Retstep=false, Dtype=none)

The function is: to return the data at a fixed interval within the specified time. He will return "num" to a sample of equal spacing, in the interval [' Start ', ' Stop ']. Where the end endpoint of the interval can be excluded.

Parameters:

start : scalar

The start value of the queue

Stop : scalar

The end value of the queue. When ' Endpoint=false ', this point is not included. In this case, the queue contains all the equidistant samples except for "num+1".

It is important to note that when ' endpoint=false ', the step size changes.

num : int, optional

The number of samples to generate. The default is 50, which must be non-negative.

endpoint : bool, optional

If true, ' stop ' is the last sample. Otherwise, ' stop ' will not be included. Default is True

retstep : bool, optional

If True, return (' Samples ', ' step '), where ' step ' is the spacing between samples.

return value:

Samples : Ndarray

There are num equidistant samples in the closed interval [start, stop] or half open interval [start, stop]

Step : Float

Only when "Retstep=true" is returned. The size of the spacing between samples

Python np.linspace

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.