Skip to content

Add Python fallback to random_k_out_graph + document dependencies - #7718

Merged
Schefflera-Arboricola merged 6 commits into
networkx:mainfrom
rossbar:random-k-out-followup
Nov 27, 2024
Merged

Schefflera-Arboricola merged 6 commits into
networkx:mainfrom
rossbar:random-k-out-followup

Conversation

@rossbar

@rossbar rossbar commented Nov 11, 2024

Copy link
Copy Markdown
Contributor

Intended to address the first bullet of #7716

Adds a try-except-based fallback to the pure-Python implementation for random_k_out_graph when NumPy is not installed. Also adds some documentation on the default behavior, as well as recipes to select the specific implementation for niche use-cases. Also adds a prominent .. note near the top of the docstring to highlight this behavior.

@dschult dschult 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.

Looks good! Thanks!!

Comment thread networkx/generators/directed.py Resolved
Co-authored-by: Mridul Seth <[email protected]>
Comment thread networkx/generators/directed.py Resolved
Comment thread networkx/generators/directed.py Resolved
Comment thread networkx/generators/directed.py Resolved

@Schefflera-Arboricola Schefflera-Arboricola 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.

LGTM! Thanks @rossbar, @dschult, @MridulS and @ruidazeng !

CI failure fixed in #7746

@Schefflera-Arboricola
Schefflera-Arboricola merged commit d6a6487 into networkx:main Nov 27, 2024
@jarrodmillman jarrodmillman added this to the 3.5 milestone Nov 27, 2024
@dschult dschult mentioned this pull request Feb 8, 2025
3 tasks done
@rossbar rossbar mentioned this pull request Jun 20, 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.

6 participants