Given a NxMxM array containing N, MxM square arrays, how do I calculate the N exponents of the MxM arrays.
from scipy.linalg import expm
U = np.random.rand(10,6,6) #Given 10 six by six arrays calculate the following:
exp = expm(U)
>>> [expm(U[0]),expm(U[1])...expm(U[9])]
I would like to avoid for loops and use numpy manipulation.