@np.deprecate(new_name="<STR_LIT>")<EOL>def expm2(A):
A = _asarray_square(A)<EOL>t = A.dtype.char<EOL>if t not in ['<STR_LIT:f>','<STR_LIT:F>','<STR_LIT:d>','<STR_LIT:D>']:<EOL><INDENT>A = A.astype('<STR_LIT:d>')<EOL>t = '<STR_LIT:d>'<EOL><DEDENT>s, vr = eig(A)<EOL>vri = inv(vr)<EOL>r = dot(dot(vr, diag(exp(s))), vri)<EOL>if t in ['<STR_LIT:f>', '<STR_LIT:d>']:<EOL><INDENT>return r.real.astype(t)<EOL><DEDENT>else:<EOL><INDENT>return r.astype(t)<EOL><DEDENT>
Compute the matrix exponential using eigenvalue decomposition.

Parameters
----------
A : (N, N) array_like
    Matrix to be exponentiated

Returns
-------
expm2 : (N, N) ndarray
    Matrix exponential of `A`