python - vectorized matrix power and matrix dot using numpy -


i want calculate power of many 2-d matrices, , fast possible. couldn't find vectorized method it.

for example:

import numpy np mat_list = [np.mat(np.random.randn(100,100)) in range(1000)] output = [np.linalg.matrix_power(mat_list[i], 100) in xrange(len(mat_list))] 

i same dot multiplications:

import numpy np mat_list1 = [np.mat(np.random.randn(100,100)) in range(1000)] mat_list2 = [np.mat(np.random.randn(100,100)) in range(1000)] output = [np.dot(a,b) a,b in zip(mat_list1,mat_list2)] 


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -