From aaf9021fa24bb6cdc0493a6c931f278ed777aaa6 Mon Sep 17 00:00:00 2001 From: Brent Yi Date: Thu, 28 Jan 2021 04:40:27 -0800 Subject: [PATCH] Naming convention nit --- jaxlie/_so2.py | 2 +- setup.py | 2 +- tests/test_operations.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jaxlie/_so2.py b/jaxlie/_so2.py index f3317e1..706c9af 100644 --- a/jaxlie/_so2.py +++ b/jaxlie/_so2.py @@ -35,7 +35,7 @@ def from_radians(theta: float) -> "SO2": sin = jnp.sin(theta) return SO2(unit_complex=jnp.array([cos, sin])) - def to_radians(self) -> float: + def as_radians(self) -> float: (radians,) = self.log() return radians diff --git a/setup.py b/setup.py index 2e9c5d8..3e4c341 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="jaxlie", - version="0.0.4", + version="0.1.0", description="Matrix Lie groups in Jax", long_description=long_description, long_description_content_type="text/markdown", diff --git a/tests/test_operations.py b/tests/test_operations.py index 4c88116..3098e97 100644 --- a/tests/test_operations.py +++ b/tests/test_operations.py @@ -29,7 +29,7 @@ def test_sample_uniform_valid(Group: Type[jaxlie.MatrixLieGroup]): def test_so2_from_to_radians_bijective(_random_module): """Check that we can convert from and to radians.""" radians = onp.random.uniform(low=-onp.pi, high=onp.pi) - assert_arrays_close(jaxlie.SO2.from_radians(radians).to_radians(), radians) + assert_arrays_close(jaxlie.SO2.from_radians(radians).as_radians(), radians) @settings(deadline=None)