Numpy Gradient Function Formula Cheat