Skip to content

Commit

Permalink
Black reformatted to 80 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnstRoell committed Jul 4, 2024
1 parent 046b26a commit 871e5ba
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions dect/ect.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ def compute_ecc(
return segment_add_coo(ecc, index)


def compute_ect_points(batch: Batch, v: torch.FloatTensor, lin: torch.FloatTensor):
def compute_ect_points(
batch: Batch, v: torch.FloatTensor, lin: torch.FloatTensor
):
"""Computes the Euler Characteristic Transform of a batch of point clouds.
Parameters
Expand All @@ -127,7 +129,9 @@ def compute_ect_points(batch: Batch, v: torch.FloatTensor, lin: torch.FloatTenso
return compute_ecc(nh, batch.batch, lin)


def compute_ect_edges(data: Batch, v: torch.FloatTensor, lin: torch.FloatTensor):
def compute_ect_edges(
data: Batch, v: torch.FloatTensor, lin: torch.FloatTensor
):
"""Computes the Euler Characteristic Transform of a batch of graphs.
Parameters
Expand Down Expand Up @@ -163,7 +167,9 @@ def compute_ect_edges(data: Batch, v: torch.FloatTensor, lin: torch.FloatTensor)
)


def compute_ect_faces(data: Batch, v: torch.FloatTensor, lin: torch.FloatTensor):
def compute_ect_faces(
data: Batch, v: torch.FloatTensor, lin: torch.FloatTensor
):
"""Computes the Euler Characteristic Transform of a batch of meshes.
Parameters
Expand Down Expand Up @@ -245,9 +251,9 @@ def __init__(self, config: ECTConfig, v=None):
super().__init__()
self.config = config
self.lin = nn.Parameter(
torch.linspace(-config.radius, config.radius, config.bump_steps).view(
-1, 1, 1, 1
),
torch.linspace(
-config.radius, config.radius, config.bump_steps
).view(-1, 1, 1, 1),
requires_grad=False,
)

Expand Down

0 comments on commit 871e5ba

Please sign in to comment.