Skip to content

Commit

Permalink
Add hypothesis
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Sep 16, 2024
1 parent 9b7c19d commit 2e7765d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dev = [
"ruff==0.6.2",
"pre-commit==3.3.2",
"pytest",
"hypothesis[numpy]",
]
examples = [
"torch>=1.13.1",
Expand Down
7 changes: 3 additions & 4 deletions tests/test_transforms_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@

import numpy as onp
import numpy.typing as onpt
from jax import numpy as jnp
import viser.transforms as vtf

from utils import (
assert_arrays_close,
assert_transforms_close,
general_group_test,
sample_transform,
)

import viser.transforms as vtf


@general_group_test
def test_sample_uniform_valid(
Expand Down Expand Up @@ -119,7 +118,7 @@ def test_multiply(
T_b_a = sample_transform(Group, batch_axes, dtype)
assert_arrays_close(
onp.einsum(
"...ij,...jk->...ik", T_w_b.as_matrix(), jnp.linalg.inv(T_w_b.as_matrix())
"...ij,...jk->...ik", T_w_b.as_matrix(), onp.linalg.inv(T_w_b.as_matrix())
),
onp.broadcast_to(
onp.eye(Group.matrix_dim, dtype=dtype),
Expand Down

0 comments on commit 2e7765d

Please sign in to comment.