Kann ich eine Untersuchung einer Matrix auf Symmetrie (A = A^T) auch ohne Schleife lösen?
Ich hätte mir da etwas in dieser Richtung vorgestellt:
Code: Alles auswählen
if A.transpose() == A:
print 'A ist symmetrisch!'
else:
print 'A ist nicht symmetrisch!'
Code: Alles auswählen
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()