Skip to content

Conversation

@selmanozleyen
Copy link
Member

Fixes #1014

@selmanozleyen
Copy link
Member Author

thanks for the feedback but fau doesn't work with python 3.10.

@selmanozleyen
Copy link
Member Author

@Intron7 should I merge this branch?

Copy link
Member

@flying-sheep flying-sheep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, but @Intron7 should check if it works in his example.

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 31.25000% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 23.94%. Comparing base (d5ff8dd) to head (0086dac).

Files with missing lines Patch % Lines
src/squidpy/gr/_build.py 31.25% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1028      +/-   ##
==========================================
+ Coverage   23.91%   23.94%   +0.02%     
==========================================
  Files          43       43              
  Lines        6368     6370       +2     
  Branches     1063     1064       +1     
==========================================
+ Hits         1523     1525       +2     
  Misses       4828     4828              
  Partials       17       17              
Files with missing lines Coverage Δ
src/squidpy/gr/_build.py 19.75% <31.25%> (+0.66%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Length equals len(data). Entry-wise factors d_i * d_j * data[k]
"""

res = np.empty_like(data, dtype=np.float64)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why np.float64?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because original function used np.float64. Didn't want to change old behaviour

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we check if this is needed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well I can't tell tbh because there was no tests for the spectral transform lol. We can just use float32 I guess. But the better way would be to ask ths users of spatial_neighbours

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Intron7 ok the results seem similar when I checked them. I also added some numerical tests to ensure stability. Also when I recalled that this was just a normalization of weights in a graph so it should not be very sensitive to precision in theory.

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.

spatial_neighbors breaks when transform='spectral'

4 participants