Python 3.7.9 (default, Aug 31 2020, 17:10:11) [MSC v.1916 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 7.18.1 -- An enhanced Interactive Python.
Restarting kernel...
In [1]: runfile('G:/UBCO/2020-2021/Python/20201003/discrete_differentiation.py', wdir='G:/UBCO/2020-2021/Python/20201003')
x: [-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
8 9 10]
diff(x): [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]
length of x: 21
length of dx: 20
dy/dx: [-19. -17. -15. -13. -11. -9. -7. -5. -3. -1. 1. 3. 5. 7.
9. 11. 13. 15. 17. 19.]
length of x1: 20
The best-fit parameters are: (1) slope = 2.0 and (2) intercept -0.9999999999999997
In [2]: