Skip to content

Commit

Permalink
beignet.func.space
Browse files Browse the repository at this point in the history
  • Loading branch information
0x00b1 committed Apr 22, 2024
1 parent cbf569d commit 6be20c1
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ select = [
"W", # PYCODESTYLE WARNINGS
]

[tool.ruff.lint.per-file-ignores]
[tool.ruff.per-file-ignores]
"__init__.py" = [
"F401", # MODULE IMPORTED BUT UNUSED
]
Expand Down
1 change: 1 addition & 0 deletions src/beignet/func/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from ._space import space
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import torch
from torch import Tensor

from .__inverse_transform import _inverse_transform
from .__transform import _transform
from ._transform import transform
from beignet.operators.__transform import _transform
from beignet.operators._inverse_transform import inverse_transform
from beignet.operators._transform import transform

T = TypeVar("T")

Expand Down Expand Up @@ -135,7 +135,7 @@ def _shift_fn(a: Tensor, b: Tensor, **_) -> Tensor:
return _displacement_fn, _shift_fn

if parallelepiped:
inverse_transformation = _inverse_transform(dimensions)
inverse_transformation = inverse_transform(dimensions)

if normalized:

Expand Down Expand Up @@ -188,7 +188,7 @@ def _shift_fn(a: Tensor, b: Tensor, **kwargs) -> Tensor:
if "transformation" in kwargs:
_transformation = kwargs["transformation"]

_inverse_transformation = _inverse_transform(_transformation)
_inverse_transformation = inverse_transform(_transformation)

if "updated_transformation" in kwargs:
_transformation = kwargs["updated_transformation"]
Expand All @@ -205,7 +205,7 @@ def _shift_fn(a: Tensor, b: Tensor, **kwargs) -> Tensor:
if "transformation" in kwargs:
_transformation = kwargs["transformation"]

_inverse_transformation = _inverse_transform(
_inverse_transformation = inverse_transform(
_transformation,
)

Expand All @@ -230,7 +230,7 @@ def _displacement_fn(
if "transformation" in kwargs:
_transformation = kwargs["transformation"]

_inverse_transformation = _inverse_transform(_transformation)
_inverse_transformation = inverse_transform(_transformation)

if "updated_transformation" in kwargs:
_transformation = kwargs["updated_transformation"]
Expand Down Expand Up @@ -270,7 +270,7 @@ def _shift_fn(a: Tensor, b: Tensor, **kwargs) -> Tensor:
if "transformation" in kwargs:
_transformation = kwargs["transformation"]

_inverse_transformation = _inverse_transform(
_inverse_transformation = inverse_transform(
_transformation,
)

Expand Down
2 changes: 2 additions & 0 deletions src/beignet/operators/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from ._inverse_transform import inverse_transform
from ._transform import transform
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from torch import Tensor


def _inverse_transform(transformation: Tensor) -> Tensor:
def inverse_transform(transformation: Tensor) -> Tensor:
"""
Calculates the inverse of an affine transformation matrix.
Expand Down
File renamed without changes.

0 comments on commit 6be20c1

Please sign in to comment.