feat: guard added to linalg.eig and tests expect NotImplementedError.

This commit is contained in:
Fabian Joswig 2023-06-19 13:32:55 +01:00
parent 13ace62262
commit 50d975a181
No known key found for this signature in database
2 changed files with 9 additions and 0 deletions

View file

@ -312,6 +312,13 @@ def test_matrix_functions():
for (i, j), entry in np.ndenumerate(diff):
assert entry.is_zero()
else:
with pytest.raises(NotImplementedError):
pe.linalg.eigh(sym)
with pytest.raises(NotImplementedError):
pe.linalg.eig(sym)
with pytest.raises(NotImplementedError):
pe.linalg.svd(sym)
# Check determinant
assert pe.linalg.det(np.diag(np.diag(matrix))) == np.prod(np.diag(matrix))