Sampling intervals: np.<arange|linspace>
Evenly spaced:
numpy.arange(FIRST = 0, LAST, STEP = 1, dtype=DTYPE)Values
FIRSTto(LAST - STEP)increasing/decreasing bySTEP:import numpy as np a = np.arange(10, 50, 10) aarray([10, 20, 30, 40])
numpy.linspace(FIRST, LAST, COUNT = 50, dtype=float)Values
FIRSTtoLAST, equally spaced toCOUNTinstances:import numpy as np a = np.linspace(10, 50, 5) aarray([10., 20., 30., 40., 50.])