From 69cb4762dfd001e6103333e0b5cc473a39176b01 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 22 May 2024 23:11:02 +0200 Subject: [PATCH] relax tolerances to avoid failing tests --- python/damask/_rotation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/damask/_rotation.py b/python/damask/_rotation.py index 003e9504c..e6118a43a 100644 --- a/python/damask/_rotation.py +++ b/python/damask/_rotation.py @@ -950,9 +950,9 @@ def from_basis(basis: np.ndarray, if not orthonormal: (U,S,Vh) = np.linalg.svd(om) # singular value decomposition om = np.einsum('...ij,...jl',U,Vh) - elif not np.allclose(np.einsum('...i,...i',om[...,0],om[...,1]),0.) \ - or not np.allclose(np.einsum('...i,...i',om[...,1],om[...,2]),0.) \ - or not np.allclose(np.einsum('...i,...i',om[...,2],om[...,0]),0.): + elif (np.abs(np.einsum('...i,...i',om[...,0],om[...,1])) > 5.e-8).any() \ + or (np.abs(np.einsum('...i,...i',om[...,1],om[...,2])) > 5.e-8).any() \ + or (np.abs(np.einsum('...i,...i',om[...,2],om[...,0])) > 5.e-8).any(): raise ValueError('orientation matrix is not orthogonal') if not np.allclose(np.linalg.det(om),1.):