Python Numpy Gradient Function In Python