np.linspace
时间: 2023-10-29 12:42:18 浏览: 43
numpy.linspace() is a function in the numpy library of Python that is used to create an array of evenly spaced numbers over a specified interval.
Syntax:
numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0)
Parameters:
- start: The start value of the sequence.
- stop: The end value of the sequence.
- num: The number of samples to generate. Default is 50.
- endpoint: If True, the stop value is included in the sequence. Default is True.
- retstep: If True, returns the step between the samples. Default is False.
- dtype: The data type of the output array. Default is None.
- axis: The axis along which to generate the samples. Default is 0.
Returns:
An array of evenly spaced numbers over the specified interval. If retstep is True, returns a tuple (array, step), where step is the spacing between the samples.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![bat](https://img-home.csdnimg.cn/images/20210720083646.png)
![pptx](https://img-home.csdnimg.cn/images/20210720083543.png)
![pptx](https://img-home.csdnimg.cn/images/20210720083543.png)
![pptx](https://img-home.csdnimg.cn/images/20210720083543.png)
![txt](https://img-home.csdnimg.cn/images/20210720083642.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)