I'll look into as soon as possible.
The reason why I wrote a gradient function is that these function didn't seem to apply a simple filter [-1 0 1], and I wanted to stick as much as possible to Dalal&Triggs paper.
According to the %%timeit function from ipython, using the gradient function seems to be faster than using both prewitt_x and prewitt_y (gradient returns both gradient_x and gradient_y).