def test_excentricity_to_iso(self, tensor):
     t = np.tile(np.array([10., 5, 1]), [10, 1])
     t[1, :] = 50**(1. / 3.)
     t2 = cond._adjust_excentricity(t, 0)
     assert np.allclose(t2.prod(axis=1), t.prod(axis=1))
     assert np.allclose(t2, 50**(1. / 3.))
 def test_iso_to_excentric(self):
     t = np.tile(np.array([1., 1, 1]), [10, 1])
     t *= np.arange(1, 11)[:, None]
     t2 = cond._adjust_excentricity(t, .99)
     assert np.allclose(t2, t)
 def test_excentricity_no_change(self, tensor):
     t = np.tile(np.array([10., 5, 1]), [10, 1])
     t[1] = [1, 1, 1]
     t2 = cond._adjust_excentricity(t, .5)
     assert np.allclose(t2, t)