Python Numpy Gradient Function Mathematica