Update main.py

modifying some of the nDeriv() and table_function_points() functions and hopefully fixing them for good.