Ich erhalte den Fehler "TypeError: '1' nicht als Datentyp"
für den folgenden Code -Chunk, < /p>
for j in range (T):
V_j=V[:,:,j]
'Check positive definiteness using Cholesky decomposition.'
'Also check the reciprocal condition number.'
try:
np.linalg.cholesky(V_j)
except np.linalg.LinAlgError:
Flag = 1
break
--> rcond = 1 / np.linalg.cond(V_j)
if rcond < 1e-15:
Flag = 1
break
< /code>
Sollte ich 1 in rcond = 1 /np.linalg.cond (v_j) für np.zeros (form, dtype = float, order = 'c')?>
TypeError: Kann '1' nicht als Datentyp -Python interpretieren ⇐ Python
-
- Similar Topics
- Replies
- Views
- Last post