Numpy Gradient Function In Python Definition