I really can not understand what numpy.gradient function does and how to use it for computation of multivariable function gradient.
numpy.gradient
For example
Also theano can compute the gradient automatically
theano
http://deeplearning.net/software/theano/tutorial/gradients.html