def test_imul(): for ms in np.random.uniform(-720, 720, (1000, 4)): m = Mat2(ms) if abs(m.det()) < 1e-6: continue assert m * m._1 == Mat2.eye() m *= m._1 assert m == Mat2.eye()
def test_constructor7(): m = Mat2.eye() assert m is not None assert m.m11 == approx(1) assert m.m12 == approx(0) assert m.m21 == approx(0) assert m.m22 == approx(1)