numpy.linspace()It is similar to the arrange function. However, it doesn?t allow us to specify the step size in the syntax. Instead of that, it only returns evenly separated values over a specified period. The system implicitly calculates the step size. SyntaxParametersIt accepts the following parameters.
ReturnAn array within the specified range is returned. Example 1Output: The array over the given range is [10. 12.5 15. 17.5 20.] Example 2Output: The array over the given range is [10. 12. 14. 16. 18.] Next Topicnumpy.logspace() |