Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mhajij committed Nov 17, 2023
1 parent e257932 commit fea398f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions test/utils/test_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@

def test_compute_laplacian_normalized_matrix():
"""Test normalize laplacian."""
adjacency_matrix = [
[0.0, 1.0, 0.0, 0.0, 0.0, 1.0],
[1.0, 0.0, 1.0, 0.0, 0.0, 0.0],
[0.0, 1.0, 0.0, 1.0, 0.0, 0.0],
[0.0, 0.0, 1.0, 0.0, 1.0, 0.0],
[0.0, 0.0, 0.0, 1.0, 0.0, 1.0],
[1.0, 0.0, 0.0, 0.0, 1.0, 0.0],
]
adjacency_matrix = np.array(
[
[0.0, 1.0, 0.0, 0.0, 0.0, 1.0],
[1.0, 0.0, 1.0, 0.0, 0.0, 0.0],
[0.0, 1.0, 0.0, 1.0, 0.0, 0.0],
[0.0, 0.0, 1.0, 0.0, 1.0, 0.0],
[0.0, 0.0, 0.0, 1.0, 0.0, 1.0],
[1.0, 0.0, 0.0, 0.0, 1.0, 0.0],
]
)

# Calculate the degree matrix
degree_matrix = np.diag(adjacency_matrix.sum(axis=1))
Expand Down
2 changes: 1 addition & 1 deletion toponetx/utils/normalization.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Normalize of Laplacians, (co)adjacency, boundary matrices of complexes."""


from typing import Tuple

import numpy as np
import scipy.sparse.linalg as spl
from numpy.linalg import pinv
Expand Down

0 comments on commit fea398f

Please sign in to comment.