networkx 3.5#
We’re happy to announce the release of networkx 3.5!
API Changes#
Save Layouts on Graphs (#7571).
Expire d_separated and minimum_d_separator functions (#7830).
Expire all_triplets deprecation (#7828).
Expire random_triad deprecation (#7829).
DEP: Raise an exception for k_core functions with multigraphs (#7831).
Deprecate graph_could_be_isomorphic (#7826).
Expire total_spanning_tree_weight deprecation (#7843).
Expire deprecation of create kwarg in nonisomorphic_trees (#7847).
New draw API (#7589).
Enhancements#
perf: optimise
random_k_out_graph
(#7702).Clausets local community detection algorithm (#7691).
find_asteroidal_triple
improvement (#7736).Add
weight
to harmonic_diameter (#7636).Densest Subgraph Problem: Greedy Peeling and Greedy++ Implementations (#7731).
single_source_all_shortest_paths: don’t loop over all nodes (#7762).
Error message improvement for nbunch_iter ( NetworkXError raised with specific message on TypeError with “iter” in msg ) (#7790).
Faster computation of energy in Laplacian centrality (#7793).
Make
forceatlas2_layout
dispatchable (#7794).Update dispatchable for
forceatlas2_layout
(#7798).Enable backend-only functions where NetworkX is just an API (#7690).
Steinertree kou enhancement in response to issue 5889 type:Enhancements (#7767).
Add Leiden as a backend-only algorithm (#7743).
Bipartite layout nodes optional (#7756).
Densest Subgraph Problem: FISTA based algorithm + Large scale tests (#7770).
Dispatch
get_node_attributes
and a few more fromnx.classes.function
(#7824).Faster
could_be_isomorphic
andnumber_of_cliques
(#7855).Add square_clustering to algorithm benchmarks (#7857).
Faster Implementation of Structural Holes (#7249).
Improve runtime of number_of_nonisomorphic_trees() (#7917).
Fix write_gexf timeformat for dynamic Graphs (#7914).
Consolidate could_be_isomorphic (#7852).
Improving rooted_tree_isomorphism for deep trees (#7945).
Fixing nx.diameter inconsistent results with usebounds=True (#7954).
Faster
square_clustering
(#7810).Avoid repeated cache conversion failures for backends (#7768).
Improve _sparse_fruchterman_reingold with L-BFGS (#7889).
Improve Performance of Tree Isomorphism and Center Calculation (#7946).
Add option for
biadjacency_matrix
to be returned as a dense NumPy array (#7973).Add Functions for Finding Connected Dominating Sets (#7774).
Add feature to make storing node contraction data optional (#7902).
Added “initial_node” param to generate_random_paths() to allow a starting node to be specified for generated walks (#8002).
Fix behavior for iterable
sources
argument inbfs_layers
(#8013).Speed up
connected_components
andweakly_connected_components
(#7971).BiRank Algorithm Implementation (#7978).
Enforce correct graph types for graph matchers (#8043).
Bug Fixes#
Update
_raise_on_directed
to work withcreate_using
pos arg (#7695).trophic_levels now checks for paths from each node to a basal node (#7453).
Fix TSP weight parameter issues (#7721).
Fix for filtered MultiGraph views from
edge_subgraph
(#7724) (#7729).BUG: fixed the
if
condition inasadpour_atsp
(#7753).Implement Bar ConnectionStyle for labels (#7739).
Fixed a divide by zero error in forceatlas2 (#7791).
Fix for issue #7645: Do not preserve ‘cw’ and ‘ccw’ attributes in PlanarEmbedding.to_undirected() (#7750).
fix typo in ramanujan branch (#7804).
Fix
with nx.config(backend_priority=backends):
(#7814).Fix handling of faux_infinite values in network_simplex (#7796).
Fixed the return type from an empty dict to an empty set (#7910).
Add
edge_attrs="weight"
toforceatlas2_layout
dispatch decorator (#7918).Fix graph_hash iteration counts and DiGraph handling (#7834).
Refactored the working of chordless_cycles to handle self loops (#7901).
Fix bc scale with k endpoints (#7908).
Fix BC scaling for source nodes with k and endpoints=False (#7949).
BUG: graph6 format invariant to trailing newline (#7941).
Fix
random_degree_sequence_graph
when input is an iterator (#7979).Improve special cases in dispatch testing (paying off tech debt) (#7982).
Fix bug when assigning list to
nx.config.backend_priority
(#8034).A minimal fix for
is_aperiodic
(#8029).fix bug of _sparse_fruchterman_reingold and remove try/except idiom (#8041).
Fix edge case in ISMAGS symmetry detection (#8055).
Documentation#
set nx-arangodb link to github (#7694).
Re-submission of gh-7087 with better file provenance (#7681).
Fix code formatting of some examples (#7730).
Add examples for custom graph in the doc of
soft_random_geometric_graph
andthresholded_random_geometric_graph
(#7749).Gallery example: bipartite a/b-core motif (#7757).
Add blurb about pytest-mpl dependency to contributing guide (#7741).
Minor updates to
single_source_shortest_path_length
docstring (#7637).Added a note to the contributor guideline to avoid numpy scalars as a… (#7773).
Correcting the example given under subgraph_is_monomorphic.py (#7779).
[easy] Add to Contributor List (#7801).
doc: mention the second major update (#7782).
DOC: Add details about more grants (#7823).
Refactor: Moving backend docs from
backends.py
tobackends.rst
(#7776).Update readwrite docstrings for the
path
parameter (#7835).Fix docstring example of
nx.generate_random_paths(index_map=...)
(#7832).Adds NVIDIA Corporation to list of supporters (#7846).
Fix use of triple backticks in docstrings (#7845).
Add paragraph about university classes to mentored projects (#7838).
Fix pygraphviz_layout example (#7849).
Add test-extras to optional dependencies (#7854).
doc: hash size are in bytes (#7866).
DOC: Clean up mentored projects page: move visualization project to completed section (#7881).
added 2 projects for GSoC 2025 (#7880).
Add missing usebounds param descr to distance docstrings (#7703).
Add examples to graph_atlas_g docstring (#7900).
Add missing
weight
andgravity
attribute toforceatlas2_layout
docstring (#7915).DOC: Update first docstring example and add a serialization example (#7928).
DOC: Remove myself from the mentor list for projects (#7943).
Fix typo in forceatlas2_layout (#7966).
Add
tournament_matrix
to docs (#7968).Add function descriptions in the threshold.py file (#7906).
bugfix: use supergraph to compute superpos in plot_clusters example (#7997).
More
random_paths
docstring improvements (#7841).Add nx-guides link to navbar without dropdown (#8015).
Clarifying backend graph class interface is_directed+is_multigraph (#8032).
Fix all sphinx build warnings (#8047).
Add a new gallery spring layout (#8042).
Add note about cycles in
maximum_flow()
(#8058).Clarify subgraph node/edge order is not preserved (#8069).
Fix typo in
min_edge_cover
docstring (#8075).
Maintenance#
MAINT: wrapping
partial
withstaticmethod()
intest_link_prediction.py
(#7673).Mv changelist to release deps (#7708).
Drop support for Python 3.10 (#7668).
Update minimum dependencies (SPEC 0) (#7711).
Remove print statements and comments from test suite (#7715).
Refactor closeness centrality tests (#7712).
Add Python fallback to random_k_out_graph + document dependencies (#7718).
Fix sphinx warnings from numpydoc parsing (#7742).
MAINT: Updating geospatial example to be compatible with
osmnx=2.0.0
(#7746).Add more tests for
nx.lowest_common_ancestor
(#7726).Update
shortest_path
andsingle_target_shortest_path_length
for 3.5 (#7754).Parametrize edge_subgraph multigraph test (#7737).
Add filters for LOBPCG convergence warnings (#7778).
MAINT: Close mpl figures in tests to clear up test env (#7783).
Update pre-commit linting (#7797).
Small dispatching refactor: simple
__call__
when no backends (#7761).Benchmarking: graph atlas (#7766).
Improve square clustering test derived from Zhang paper (reference 2) (#7811).
Fix exception for backend-only functions (#7812).
Add a subplot fixture to automate test cleanup (#7799).
MAINT: use nx.layout instead of importing layouts (#7819).
MAINT: Move stub func in the correct scope for pickle test (#7818).
Ensure standard import conventions are used (#7821).
Clean up pygrep pre-commit for import convention checks (#7822).
Add a few more square clustering test cases (#7825).
Don’t use
assert
when usingpytest.raises
(#7833).Update doc requirements (#7837).
Update developer requirements (#7839).
MAINT: Minus not underscore in the dep package name (#7840).
Update readwrite docstrings for the
path
parameter (#7835).Fix docstring example of
nx.generate_random_paths(index_map=...)
(#7832).Fix use of triple backticks in docstrings (#7845).
Add .mailmap file to consilidate contributors (#7853).
TST: Refactor example test case generation functions (#7844).
Refactor network_simplex test of faux_infinity (#7858).
Change CRLF format of two files (#7861).
Fix some typos (#7863).
Pre commit hooks to check line endings and trailing whitespace (#7862).
MAINT: replace the SHAs for blame and move the changes within pre-commit (#7869).
Rm stray instances of sparse matrices from test suite (#7860).
Remove unused imports (#7864).
Remove unnecessary
dict(...)
for SSSP algos that return dicts (#7878).Change function calls to address pandas linting (#7885).
Activate pycodestyle in linting pre-commit (#7859).
Correct sphinx warnings from doc build (#7888).
effective_size
of nodes with only self-loop edges is undefined (#7347).DOC: docstring changes to
to_dict_of_dicts
andattr_matrix
and input name change inmin_fill_in_heuristic
(#7883).Update layout.py (#7939).
Tree isomorphism input validation (#7920).
Tweaks and notes from a dive into backends.py (#7884).
MAINT: Follow-up to 7945 - rm helper function (#7952).
Some light refactoring to make the tree isomorphism tests more readable (#7924).
new try at will_call_mutate_inputs (#7959).
MAINT: rm debug print from similarity module (#7937).
Improve special cases in dispatch testing (paying off tech debt) (#7982).
Remove unused import in convert_matrix.py (networkx.utils.not_implemented_for) (#7983).
Use
-n auto
from pytest-xdist for dispatch and coverage CI jobs (#7987).Make test file names unique to be threadsafe (#7998).
Update pre-commit repos (#8017).
Minor follow-up to gh-8002 tests (#8016).
Add linting for line length in docstrings and comments (#7938).
Add sg_execution_times.rst to gitignore (#8025).
Support both pydot v3 and pydot v4 (#8027).
Update copyright license years (#8038).
Fix all sphinx build warnings (#8047).
Fix intermittent test failures in expander graph generator tests (#8048).
Refactor tree_isomorphism to improve code reuse and readability (#7929).
STY: Rm local variable remapping of heappush and heappop (#8051).
TST: Minor improvements to layout test suite (#8049).
Minor refactor to cleanup/improve matching test suite (#8068).
Contributors#
56 authors added to this release (alphabetically):
Aditi Juneja (@Schefflera-Arboricola)
akshita (@akshitasure12)
Alejandro Candioti (@amcandio)
Andrew Knyazev, Professor Emeritus (@lobpcg)
Anthony Labarre (@alabarre)
Anthony Mahanna (@aMahanna)
Christian Clauss (@cclauss)
Colman Bouton (@LorentzFactor)
Dan Schult (@dschult)
dgpb (@dg-pb)
Elfarouk Harb (@FaroukY)
Erik Welch (@eriknw)
Fei Pan (@fei0319)
Fernando Pérez (@fperez)
Gilles Peiffer (@Peiffap)
gmichaeli (@GalMichaeli)
Hesam Sheikh (@hesamsheikh)
Hiroki Hamaguchi (@HirokiHamaguchi)
Jarrod Millman (@jarrodmillman)
Jason Mitchell (@oestej)
Juanita Gomez (@juanis2112)
Keith Hughitt (@khughitt)
Matt Schwennesen (@mjschwenne)
Matt Thorne (@MattThorne)
Maverick18 (@Aditya-Shandilya1182)
Michael Weinold (@michaelweinold)
Morteza24 (@Morteza-24)
Mridul Seth (@MridulS)
Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
Peter C Kroon (@pckroon)
Po-Lin Cho (@berlincho)
Qian Zhang (@QianZhang19)
Raj Pawar (@Raj3110)
Ralph Liu (@nv-rliu)
Ratan Kulshreshtha (@RatanShreshtha)
Ricardo Bittencourt (@ricbit)
Rick Ratzel (@rlratzel)
Ross Barnowski (@rossbar)
Shiyun(Arthur) Hu (@Shiyun-Hu)
Shunyang Li (@ShunyangLi)
Thomas Louf (@TLouf)
Théo Cavignac (@Lattay)
TL Vromen (@ThijsVromen)
Woojin Jung (@WoojinJung-04)
Xiao Yuan (@yuanx749)
Zhige Xin (@xinzhige)
大王白小甫 (@dawangbaixiaofu)
32 reviewers added to this release (alphabetically):
Aditi Juneja (@Schefflera-Arboricola)
Alejandro Candioti (@amcandio)
Anthony Mahanna (@aMahanna)
Chuck Hastings (@ChuckHastings)
Colman Bouton (@LorentzFactor)
Dan Schult (@dschult)
Elfarouk Harb (@FaroukY)
Erik Welch (@eriknw)
Fei Pan (@fei0319)
Gilles Peiffer (@Peiffap)
gmichaeli (@GalMichaeli)
Hiroki Hamaguchi (@HirokiHamaguchi)
Jarrod Millman (@jarrodmillman)
Keith Hughitt (@khughitt)
Matt Schwennesen (@mjschwenne)
Matt Thorne (@MattThorne)
Michael Martini (@MichaelMartini-Celonis)
Mridul Seth (@MridulS)
Qian Zhang (@QianZhang19)
Raj Pawar (@Raj3110)
Ricardo Bittencourt (@ricbit)
Rick Ratzel (@rlratzel)
Ross Barnowski (@rossbar)
Ruida Zeng (@ruidazeng)
Shiyun(Arthur) Hu (@Shiyun-Hu)
Thomas Louf (@TLouf)
TL Vromen (@ThijsVromen)
Woojin Jung (@WoojinJung-04)
Xiao Yuan (@yuanx749)
_These lists are automatically generated, and may not be complete or may contain duplicates._