Difference between frame rate and sampling rate?
One method uses np.linspace() and the other one np.arrange() to create the time domain vector.

I suggest reading the documentation


https://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html
https://docs.scipy.org/doc/numpy/reference/generated/numpy.linspace.html


The first method has a small error, so the frequency will not be 100% correct.

Update

Common error with using linspace: Let's say you want three samples that are 1 apart. linspace(0,3,3) will give you [0 1.5 3], so the spacing is bigger than you want. The correct way is to adjust the upper limit by subtracting 1 interval (or 1/samplerate), so it should be linspace(0,2,3) or 

linspace(0,5-1/framerate,framerate*5)