Skip to content
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 1 commit into from
Feb 5, 2025
Merged

Switch from lru_cache to cache #657

merged 1 commit into from
Feb 5, 2025

Conversation

nwlandry
Copy link
Collaborator

@nwlandry nwlandry commented Feb 4, 2025

Fixes #656.

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.44%. Comparing base (a8bf185) to head (fe8e7a4).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@nwlandry nwlandry requested a review from maximelucas February 5, 2025 11:37
@nwlandry nwlandry merged commit f139fe5 into main Feb 5, 2025
20 checks passed
@nwlandry nwlandry deleted the switch-to-cache branch February 5, 2025 14:34
@nwlandry nwlandry restored the switch-to-cache branch February 6, 2025 15:24
@nwlandry nwlandry deleted the switch-to-cache branch February 6, 2025 15:24
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

switch lru_cache to cache
2 participants