コード例 #1
0
 def test_in_FZ_vectorization(self, set_of_rodrigues, lattice):
     result = Orientation.from_Rodrigues_vector(
         rho=set_of_rodrigues.reshape(
             (-1, 4, 4)), lattice=lattice).in_FZ.reshape(-1)
     for r, rho in zip(result, set_of_rodrigues[:len(result)]):
         assert r == Orientation.from_Rodrigues_vector(
             rho=rho, lattice=lattice).in_FZ
コード例 #2
0
 def test_from_Rodrigues_vector(self):
     assert np.all(
         Orientation.from_Rodrigues_vector(rho=np.array([0, 0, 1, 0]),
                                           lattice='triclinic').as_matrix()
         == np.eye(3))