Skip to content

Commit

Permalink
rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
0x00b1 committed Apr 10, 2024
1 parent d47d98c commit d19bbc6
Show file tree
Hide file tree
Showing 90 changed files with 114 additions and 153 deletions.
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ select = [
"W", # PYCODESTYLE WARNINGS
]

[tool.ruff.format]
docstring-code-format = true

[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"F401", # MODULE IMPORTED BUT UNUSED
Expand Down
2 changes: 1 addition & 1 deletion src/beignet/ops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
rotation_vector_to_euler_angle,
rotation_vector_to_quaternion,
rotation_vector_to_rotation_matrix,
slerp,
translation_identity,
)
from ._interpolation import slerp

__all__ = [
"apply_euler_angle",
Expand Down
1 change: 1 addition & 0 deletions src/beignet/ops/_geometry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
rotation_vector_to_euler_angle,
rotation_vector_to_quaternion,
rotation_vector_to_rotation_matrix,
slerp,
translation_identity,
)
83 changes: 50 additions & 33 deletions src/beignet/ops/_geometry/_transformations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,43 +1,60 @@
from ._rotations import (
apply_euler_angle,
from ._apply_euler_angle import apply_euler_angle
from ._apply_quaternion import (
apply_quaternion,
apply_rotation_matrix,
apply_rotation_vector,
compose_euler_angle,
compose_quaternion,
compose_rotation_matrix,
compose_rotation_vector,
euler_angle_identity,
euler_angle_magnitude,
euler_angle_mean,
)
from ._apply_rotation_matrix import apply_rotation_matrix
from ._apply_rotation_vector import apply_rotation_vector
from ._compose_euler_angle import compose_euler_angle
from ._compose_quaternion import compose_quaternion
from ._compose_rotation_matrix import compose_rotation_matrix
from ._compose_rotation_vector import compose_rotation_vector
from ._euler_angle_identity import euler_angle_identity
from ._euler_angle_magnitude import euler_angle_magnitude
from ._euler_angle_mean import euler_angle_mean
from ._euler_angle_to_quaternion import (
euler_angle_to_quaternion,
euler_angle_to_rotation_matrix,
euler_angle_to_rotation_vector,
invert_euler_angle,
invert_quaternion,
invert_rotation_matrix,
invert_rotation_vector,
quaternion_identity,
quaternion_magnitude,
quaternion_mean,
)
from ._euler_angle_to_rotation_matrix import euler_angle_to_rotation_matrix
from ._euler_angle_to_rotation_vector import euler_angle_to_rotation_vector
from ._invert_euler_angle import invert_euler_angle
from ._invert_quaternion import invert_quaternion
from ._invert_rotation_matrix import invert_rotation_matrix
from ._invert_rotation_vector import invert_rotation_vector
from ._quaternion_identity import quaternion_identity
from ._quaternion_magnitude import quaternion_magnitude
from ._quaternion_mean import quaternion_mean
from ._quaternion_to_euler_angle import (
quaternion_to_euler_angle,
)
from ._quaternion_to_rotation_matrix import (
quaternion_to_rotation_matrix,
)
from ._quaternion_to_rotation_vector import (
quaternion_to_rotation_vector,
random_euler_angle,
random_quaternion,
random_rotation_matrix,
random_rotation_vector,
rotation_matrix_identity,
rotation_matrix_magnitude,
rotation_matrix_mean,
rotation_matrix_to_euler_angle,
)
from ._random_euler_angle import random_euler_angle
from ._random_quaternion import random_quaternion
from ._random_rotation_matrix import random_rotation_matrix
from ._random_rotation_vector import random_rotation_vector
from ._rotation_matrix_identity import rotation_matrix_identity
from ._rotation_matrix_magnitude import rotation_matrix_magnitude
from ._rotation_matrix_mean import rotation_matrix_mean
from ._rotation_matrix_to_euler_angle import rotation_matrix_to_euler_angle
from ._rotation_matrix_to_quaternion import (
rotation_matrix_to_quaternion,
)
from ._rotation_matrix_to_rotation_vector import (
rotation_matrix_to_rotation_vector,
rotation_vector_identity,
rotation_vector_magnitude,
rotation_vector_mean,
rotation_vector_to_euler_angle,
)
from ._rotation_vector_identity import rotation_vector_identity
from ._rotation_vector_magnitude import rotation_vector_magnitude
from ._rotation_vector_mean import rotation_vector_mean
from ._rotation_vector_to_euler_angle import rotation_vector_to_euler_angle
from ._rotation_vector_to_quaternion import (
rotation_vector_to_quaternion,
)
from ._rotation_vector_to_rotation_matrix import (
rotation_vector_to_rotation_matrix,
)
from ._translations import translation_identity
from ._slerp import slerp
from ._translation_identity import translation_identity
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from torch import Tensor

from ._apply_rotation_matrix import apply_rotation_matrix
from ._quaternion_to_rotation_matrix import (
quaternion_to_rotation_matrix,
)
from ._apply_rotation_matrix import apply_rotation_matrix


def apply_quaternion(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from torch import Tensor

from ._apply_rotation_matrix import apply_rotation_matrix
from ._quaternion_to_rotation_matrix import (
quaternion_to_rotation_matrix,
)
from ._rotation_vector_to_quaternion import (
rotation_vector_to_quaternion,
)
from ._apply_rotation_matrix import apply_rotation_matrix


def apply_rotation_vector(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from torch import Tensor
from ._euler_angle_to_quaternion import euler_angle_to_quaternion

from ._compose_quaternion import compose_quaternion
from ._euler_angle_to_quaternion import euler_angle_to_quaternion
from ._quaternion_to_euler_angle import quaternion_to_euler_angle


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from torch import Tensor

from ._quaternion_to_rotation_matrix import quaternion_to_rotation_matrix
from ._compose_quaternion import compose_quaternion
from ._quaternion_to_rotation_matrix import quaternion_to_rotation_matrix
from ._rotation_matrix_to_quaternion import rotation_matrix_to_quaternion


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from torch import Tensor
from ._quaternion_to_rotation_vector import quaternion_to_rotation_vector

from ._compose_quaternion import compose_quaternion
from ._quaternion_to_rotation_vector import quaternion_to_rotation_vector
from ._rotation_vector_to_quaternion import rotation_vector_to_quaternion


Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import torch
from torch import Generator, Tensor

from ._random_quaternion import random_quaternion
from ._quaternion_to_euler_angle import (
quaternion_to_euler_angle,
)
from ._random_quaternion import random_quaternion


def random_euler_angle(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import torch
from torch import Generator, Tensor

from ._random_quaternion import random_quaternion
from ._quaternion_to_rotation_matrix import (
quaternion_to_rotation_matrix,
)
from ._random_quaternion import random_quaternion


def random_rotation_matrix(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import torch
from torch import Generator, Tensor

from ._random_quaternion import random_quaternion
from ._quaternion_to_rotation_vector import (
quaternion_to_rotation_vector,
)
from ._random_quaternion import random_quaternion


def random_rotation_vector(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from torch import Tensor

from ._quaternion_magnitude import quaternion_magnitude
from ._rotation_matrix_to_quaternion import (
rotation_matrix_to_quaternion,
)
from ._quaternion_magnitude import quaternion_magnitude


def rotation_matrix_magnitude(input: Tensor) -> Tensor:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from torch import Tensor

from ._rotation_matrix_to_quaternion import (
rotation_matrix_to_quaternion,
)
from ._quaternion_to_euler_angle import (
quaternion_to_euler_angle,
)
from ._rotation_matrix_to_quaternion import (
rotation_matrix_to_quaternion,
)


def rotation_matrix_to_euler_angle(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from torch import Tensor

from ._rotation_matrix_to_quaternion import (
rotation_matrix_to_quaternion,
)
from ._quaternion_to_rotation_vector import (
quaternion_to_rotation_vector,
)
from ._rotation_matrix_to_quaternion import (
rotation_matrix_to_quaternion,
)


def rotation_matrix_to_rotation_vector(
Expand Down
58 changes: 0 additions & 58 deletions src/beignet/ops/_geometry/_transformations/_rotations/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def slerp(
out : Tensor
Output.
"""
""" # noqa: E501
if time.shape[-1] != rotation.shape[-2]:
raise ValueError("`times` and `rotations` must match in size.")

Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion src/beignet/ops/_interpolation/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import beignet.ops
import hypothesis.extra.numpy
import hypothesis.strategies
import numpy
import torch.testing
import beignet.ops
from scipy.spatial.transform import Rotation


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import beignet.ops
import hypothesis.extra.numpy
import hypothesis.strategies
import numpy
import torch.testing
import beignet.ops
from scipy.spatial.transform import Rotation


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import beignet.ops
import hypothesis.extra.numpy
import hypothesis.strategies
import numpy
import torch.testing
import beignet.ops
from scipy.spatial.transform import Rotation


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import beignet.ops
import hypothesis.extra.numpy
import hypothesis.strategies
import numpy
import torch.testing
import beignet.ops
from scipy.spatial.transform import Rotation


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import operator

import beignet.ops
import hypothesis.strategies
import torch.testing
import beignet.ops
import operator
from scipy.spatial.transform import Rotation


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import operator

import beignet.ops
import hypothesis.strategies
import torch.testing
import beignet.ops
import operator
from scipy.spatial.transform import Rotation


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import operator

import beignet.ops
import hypothesis.strategies
import torch.testing
import beignet.ops
import operator
from scipy.spatial.transform import Rotation


Expand Down
Loading

0 comments on commit d19bbc6

Please sign in to comment.