Usage of linspace in numpy (function for creating an equal-difference series), numpylinspace

Source: Internet
Author: User

Usage of linspace in numpy (function for creating an equal-difference series), numpylinspace

The linspace function is a function used to create an equal-difference series. It is best to see this function in the Matlab language. Recently, I learned Numpy in Python and found this function, the following is a summary of your learning experience.

 

(1) Specify the start and end points.

 

By default, the number of equals columns is 50.

 

 

 

(2) Number of equal-difference Columns

 

 

 

 

(3) If the number of elements in a series is specified, you can setEnd PointStatus.

Endpoint: Bool, optional

If True,StopIs the last sample. Otherwise, it is not supported ded. Default is True.

 

 

 

 

 

 

(4) If the number of elements in a series is specified, you can setInterval attributeStatus.

Retstep: Bool, optional

If True, return (Samples,Step), WhereStepIs the spacing between samples.

 

From the preceding results, we can see that the x returned by the step difference is set and the output is a tuples, and the second element of the tuples is the step difference of 1.0.

 

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.