def coshm(A):
 A = _asarray_square(A)
 return _maybe_real(A, (0.5 * (expm(A) + expm((- A)))))

def coshm ( A ) : A = _asarray_square ( A ) return _maybe_real ( A , ( 0.5 * ( expm ( A ) + expm ( ( - A ) ) ) ) )
compute the hyperbolic matrix cosine .