2016-04-26 12 views
0

Ich habe eine 512 x 512 Matrix Avg und es hat viele Null-und Nicht-Null-Werte. Jetzt möchte ich eine Inplace-Element-weise Quadratwurzel der Matrix. Dies ist ein Teil meines Codessqrtm() Funktion gibt nan

import numpy as np 
from scipy.linalg import sqrtm 

Avg = sqrtm(Avg) 
np.savetxt('Avg.txt', Avg) 

Aber ist die Ausgabe alle nan und es sagt, dass die Matrix singulär ist und nicht eine Quadratwurzel haben.

Antwort