def test_group_type_error(self): with pytest.raises(Exception) as exc: Group([1, 2, 3]) assert "Data must be Fol, Lin or Vec3 type." == str(exc.exception)
def test_group_heterogenous_error(self): with pytest.raises(Exception) as exc: Group([Fol(10, 10), Lin(20, 20)]) assert "All data in group must be of same type." == str( exc.exception)
def test_ortensor_uniform(): f = Fol.rand() assert np.allclose( Ortensor.from_group(Group([f.V, f.rake(-45), f.rake(45)]))._evals, np.ones(3) / 3)