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

Made exact assortativity reproducible #526

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Made exact assortativity reproducible #526

merged 1 commit into from
Apr 2, 2024

Conversation

nwlandry
Copy link
Collaborator

@nwlandry nwlandry commented Mar 27, 2024

In the degree_assortativity function, when using the exact keyword, it was not reproducible because the two degrees were randomly shuffled prior to putting into the numpy.corrcoef function. NetworkX handles this by copying the pairs twice: $(u, v)$ and $(v,u )$ (See this comment). This PR fixes this issue.

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.19%. Comparing base (732bd85) to head (b0cf179).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #526      +/-   ##
==========================================
- Coverage   92.20%   92.19%   -0.02%     
==========================================
  Files          60       60              
  Lines        4389     4392       +3     
==========================================
+ Hits         4047     4049       +2     
- Misses        342      343       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nwlandry
Copy link
Collaborator Author

nwlandry commented Apr 2, 2024

@thomasrobiglio, do you think you will be able to review this PR? Thanks!

@thomasrobiglio
Copy link
Collaborator

hey @nwlandry, sure! I will review this afternoon or tomorrow morning :)

@nwlandry
Copy link
Collaborator Author

nwlandry commented Apr 2, 2024

Thanks so much! I appreciate it!

Copy link
Collaborator

@thomasrobiglio thomasrobiglio 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 @nwlandry! Thank you!

@nwlandry
Copy link
Collaborator Author

nwlandry commented Apr 2, 2024

Thanks so much for reviewing!

@nwlandry nwlandry merged commit 369a10a into main Apr 2, 2024
24 checks passed
@nwlandry nwlandry deleted the fix-assortativity branch April 2, 2024 15:19
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.

None yet

2 participants