-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from lru_cache
to cache
#657
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #657 +/- ##
=======================================
Coverage 93.44% 93.44%
=======================================
Files 64 64
Lines 5004 5004
=======================================
Hits 4676 4676
Misses 328 328 ☔ View full report in Codecov by Sentry. |
maximelucas
approved these changes
Feb 5, 2025
kaiser-dan
added a commit
to kaiser-dan/xgi
that referenced
this pull request
Feb 14, 2025
* fix: rewrite `normalized_hypergraph_laplacian` Fixes the implementation of `normalized_hypergraph_laplacian` to prevent negative eigenvalues. Rewrites core matrix calculations in full definition. * test: add unit tests for updated laplacian Adds a proprty test for eigenvalue sign. Adds error tests for new `weights` variable. * doc: update `normalized_hypergraph_laplacian` doc Updated 'Raises' portion of function docstring to include type and length error catches on `weights` parameter. * test: added issue xgi-org#657 m.w.e. as test * fix(test): fix typo in unit test * Update xgi/linalg/laplacian_matrix.py Implement suggestion - Edge weight matrix Co-authored-by: Maxime Lucas <[email protected]> * test: add sqrt(d) eigenvector, true_L tests * feat: update weighted argument for laplacian * doc: update normalized_hypergraph_laplacian args * Update xgi/linalg/laplacian_matrix.py Fix docstring typo Co-authored-by: Maxime Lucas <[email protected]> * Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> * Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> * Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> * Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> * Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> * Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> * Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> * Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> * Update xgi/linalg/laplacian_matrix.py Implement suggestion - Edge weight matrix Co-authored-by: Maxime Lucas <[email protected]> * feat: update weighted argument for laplacian * doc: update normalized_hypergraph_laplacian args * Update xgi/linalg/laplacian_matrix.py Fix docstring typo Co-authored-by: Maxime Lucas <[email protected]> Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> * test: separated xgi-org#647 m.w.e. into new test Add the minimum(?) working example of issue xgi-org#647 as new `test_` function. Tidied `test_normalized_hypergraph_laplacian` and added L2 and L3 comparison. * feat: update scipy sparse array to modern use * chore: update diags_array scipy use in 'laplacian' * Update xgi/linalg/laplacian_matrix.py Co-authored-by: Maxime Lucas <[email protected]> --------- Co-authored-by: Maxime Lucas <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #656.