def clmixhess(obj, exe, arg1, arg2, delta=DELTA):
f, x = get_method_and_copy_of_attribute(obj, exe, arg1)<EOL>_, y = get_method_and_copy_of_attribute(obj, exe, arg2)<EOL>def hess_f(*args, **kwargs):<EOL><INDENT>hess_val = numpy.zeros(x.shape + y.shape)<EOL>it = numpy.nditer(x, op_flags=['<STR_LIT>'], flags=['<STR_LIT>'])<EOL>for xi in it:<EOL><INDENT>i = it.multi_index<EOL>jt = numpy.nditer(y, op_flags=['<STR_LIT>'], flags=['<STR_LIT>'])<EOL>for yj in jt:<EOL><INDENT>j = jt.multi_index<EOL>xi += delta/<NUM_LIT:2><EOL>yj += delta/<NUM_LIT:2><EOL>fpp = f(*args, **kwargs)<EOL>yj -= delta<EOL>fpm = f(*args, **kwargs)<EOL>xi -= delta<EOL>fmm = f(*args, **kwargs)<EOL>yj += delta<EOL>fmp = f(*args, **kwargs)<EOL>xi += delta/<NUM_LIT:2><EOL>yj -= delta/<NUM_LIT:2><EOL>hess_val[i + j] = (fpp + fmm - fpm - fmp)/delta**<NUM_LIT:2><EOL><DEDENT><DEDENT>return hess_val<EOL><DEDENT>return hess_f<EOL>
Returns numerical mixed Hessian function of given class method
with respect to two class attributes
Input: obj, general object
       exe (str), name of object method
       arg1(str), name of object attribute
       arg2(str), name of object attribute
       delta(float, optional), finite difference step
Output: Hessian function object