`symmetry` fails with assertion error because equality testing for `Model`s is poor.
Assertion error happens when comparing the original model with the transformed one using the symmetry that was found. This is particularly bad when the matrices in the model have nonzero entries spanning multiple orders of magnitude.
Solution: Implement a better version of np.allclose
. allclose
calculates the acceptable errors elementwise, almost zero entries get compared by the default atol
regardless of the overall scale of the matrix. Instead, the acceptable error should be relative to the largest entry in the matrix.