Skip to content

fix typo in ramanujan branch - #7804

Merged
rossbar merged 3 commits into
networkx:mainfrom
vttrifonov:fix-7800
Jan 22, 2025
Merged

rossbar merged 3 commits into
networkx:mainfrom
vttrifonov:fix-7800

Conversation

@vttrifonov

Copy link
Copy Markdown
Contributor

fixes #7800

@MridulS MridulS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @vttrifonov!

@vttrifonov

Copy link
Copy Markdown
Contributor Author

added a test for generating larger expanders (2000 notes) which was failing for me with d=4

@vttrifonov

vttrifonov commented Jan 21, 2025 •

Copy link
Copy Markdown
Contributor Author

just noticed that the new version of networkx requires python 3.11. i am only mentioning this because i am still using python 3.10 in my projects so this created a bit of an issue when i was trying to add the fix to main so instead I add it to the nx3.4.2 commit (which was fine with my python 3.10 setup)...

not a heavy user of networkx (yet :-)) so do not have much of a skin in this game but raising the python version could create a bar for usage. just saying. maybe you guys have a good reason... could file an issue that mentions this if you think it is worth it

@MridulS



@pytest.mark.parametrize("d, n", [(2, 7), (4, 10), (4, 16)])
@pytest.mark.parametrize("d, n", [(2, 7), (4, 10), (4, 16), (4, 2000), (6, 2000)])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm getting intermittent failures on the (6, 2000) case with a too many iterations exception. Without having any deeper insight into the test case, I'd vote to remove it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i will remove the (6,2000) test: i do not have a particular reason for it and we are testing the code not the bound itself. so...

btw i just tried and with the default max_tries=100 out of 1000 trials i got ~20% fails. with max_tries=1000 i did not get any fails in 1000 trials...

@rossbar

rossbar commented Jan 21, 2025

Copy link
Copy Markdown
Contributor

not a heavy user of networkx (yet :-)) so do not have much of a skin in this game but raising the python version could create a bar for usage. just saying. maybe you guys have a good reason... could file an issue that mentions this if you think it is worth it

The policy for which Python versions to support is governed by SPEC 0 which is formulated via discussion across scientific Python projects. Check out the link if you're interested!

@rossbar rossbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks for the fix + test case @vtrifonov-altos !

CI failures are unrelated, so in this goes!

@rossbar
rossbar merged commit 0989e06 into networkx:main Jan 22, 2025
@jarrodmillman jarrodmillman added this to the 3.5 milestone May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

wrong bound in is_regular_expander

5 participants