Added some documentation details in the comments for multidimensional theta.