Skip to content

Commit

Permalink
rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
0x00b1 committed Apr 8, 2024
1 parent c1a03fe commit d47d98c
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@ def _strategy(function):

return (
{
"input": torch.from_numpy(rotation.as_quat(canonical=False)),
"input": torch.from_numpy(
rotation.as_quat(
canonical=False,
),
),
},
torch.unsqueeze(
torch.abs(
torch.from_numpy(
rotation.mean().as_quat(canonical=False),
rotation.mean().as_quat(
canonical=False,
),
),
),
dim=0,
Expand All @@ -35,6 +41,10 @@ def test_quaternion_mean(data):
parameters, expected = data

torch.testing.assert_close(
torch.abs(beignet.ops.quaternion_mean(**parameters)),
torch.abs(
beignet.ops.quaternion_mean(
**parameters,
),
),
expected,
)

0 comments on commit d47d98c

Please sign in to comment.