Source code for mechelastic.tests.symmetry
#!/usr/bin/env python
import numpy as np
[docs]def check_symmetric(a, tol=1e-8):
"""Checks if a matrix is symmetric."""
return np.allclose(a, a.T, atol=tol)
#!/usr/bin/env python
import numpy as np
[docs]def check_symmetric(a, tol=1e-8):
"""Checks if a matrix is symmetric."""
return np.allclose(a, a.T, atol=tol)