Numpy Gradient Function In Python With Parameters