arange allows you to define the size of the step.it returns evenly spaced values within a given interval.

example: arange allows you to define the stepsize.

np.arange(0,1,.1)

array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])

--

--

linspace is used to create an evenly spaced sequence in a specified interval.

linspace is an in-built function in the python Numpy library. linspace allows you to define the number of steps.

example: it returns the evenly spaced numbers over a specified interval.

np.linspace(0,1,11)

the output is

array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. ])

--

--