Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Hale committed Jul 2, 2024
1 parent ab5f4e4 commit e5038f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="sgw_tools",
version="2.4",
version="2.4.1",
author="Mark Hale",
license="MIT",
description="Spectral graph wavelet tools",
Expand Down
2 changes: 1 addition & 1 deletion sgw_tools/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def _eigL(self, spectrum_only):
# more accurate to decompose the adjacency matrix itself then shift the result
e, U = util.eigh(self.W, spectrum_only=spectrum_only)
e = np.flip(1 - e/np.max(e))
U = np.flip(U, axis=1) if U else None
U = np.flip(U, axis=1) if U is not None else None
return e, U
else:
return super()._eigL(spectrum_only=spectrum_only)
Expand Down
4 changes: 4 additions & 0 deletions tests/test_biggraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ def test_fourier_basis(self):
assert len(G.e) == G.N
assert G.U.shape[1] == G.N
assert G.e[-1] < 2

def test_adjacency_fourier_basis(self):
G = BigGraph.create_from(graphs.Logo(), lap_type='adjacency')
G.compute_fourier_basis()

def test_eigendecompositions(self):
G = BigGraph.create_from(graphs.Logo())
Expand Down

0 comments on commit e5038f5

Please sign in to comment.