Skip to content

Commit

Permalink
Naming convention nit
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Jan 28, 2021
1 parent b59c6ba commit aaf9021
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jaxlie/_so2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit aaf9021

Please sign in to comment.