Skip to content

Commit 0a41efe

Browse files
committed
?
1 parent 9ede4b1 commit 0a41efe

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

modules/transforms/feature_liftings/feature_liftings.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ def lift_features(
2828
-------
2929
torch_geometric.data.Data | dict
3030
The lifted data."""
31-
keys = sorted(
32-
[key.split("_")[1] for key in data if "incidence" in key]
33-
) # : SIM118
31+
keys = sorted([key.split("_")[1] for key in data.keys() if "incidence" in key]) # noqa : SIM118
3432
for elem in keys:
3533
if f"x_{elem}" not in data:
3634
idx_to_project = 0 if elem == "hyperedges" else int(elem) - 1
@@ -55,4 +53,4 @@ def forward(
5553
torch_geometric.data.Data | dict
5654
The lifted data.
5755
"""
58-
return self.lift_features(data)
56+
return self.lift_features(data)

test/transforms/feature_liftings/test_projection_sum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ def test_lift_features(self):
8787

8888
assert (
8989
expected_x_hyperedges == lifted_data.x_hyperedges
90-
).all(), "Something is wrong with the lifted features x_hyperedges."
90+
).all(), "Something is wrong with the lifted features x_hyperedges."

0 commit comments

Comments
 (0)