Skip to main content
`Ctrl`+`K`

# NetworkX 3.3

Release date: 6 April 2024

Supports Python 3.10, 3.11, and 3.12.

NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.

For more information, please visit our website and our gallery of examples. Please send comments and questions to the networkx-discuss mailing list.

## API Changes

- Disallow negative number of nodes in `complete_multipartite_graph` (#7057).

- DEP: Deprecate the all_triplets one-liner (#7060).

- [A-star] Added expansion pruning via cutoff if cutoff is provided (#7073).

- Make HITS raise exceptions consistent with power iterations (#7084).

- DEP: Deprecate random_triad (#7061).

- Added feature modular graph product (#7227).

- ENH: Speed up common/non_neighbors by using _adj dict operations (#7244).

- Deprecate the `create` argument of `nonisomorphic_trees` (#7316).

- Improve total_spanning_tree_weight (#7100).

- Update __init__.py (#7320).

- add **kwargs to traveling_salesman_problem (#7371).

## Enhancements

- Add Tadpole graph (#6999).

- [A-star] Added expansion pruning via cutoff if cutoff is provided (#7073).

- Implementation of \(S^1\) model (#6858).

- [Feat] Random expanders utilities (#6761).

- Compare graphs for generator functions when running tests with backend (#7066).

- Add Kirchhoff index / Effective graph resistance (#6926).

- Changed return types of shortest path methods to improve consistency (#6584).

- New PR for Fixes minimal d-separator function failing to handle cases where no d-separators exist (#7019).

- ENH : Provide non-normalized and normalized directed laplacian matrix calculation (#7199).

- feat: drop the use of node attribute “first_nbr” in PlanarEmbedding (#7202).

- Add functions to compute Schultz and Gutman Index (#3709).

- Divisive community algorithms (#5830).

- Added feature modular graph product (#7227).

- ENH : added `sort_neighbors` to all functions in `depth_first_search.py` (#7196).

- New graph generator for the Kneser graph (#7146).

- Draw MultiDiGraph edges and labels qa7008 (#7010).

- Use github actions to run a comparison benchmark (#7268).

- BFS layout implementation (#5179).

- Add `max_level=` argument to `louvain_communities` to limit macro-iterations (#6909).

- Review and update `@nx._dispatchable` usage since 3.2.1 (#7302).

- Transmogrify `_dispatchable` objects into functions (#7298).

- fix: make `PlanarEmbedding.copy()` use `add_edges_from()` from parent (closes #7223) (#7224).

- Allow seed of np.random instance to exactly produce arbitrarily large integers (#6869).

- Improve total_spanning_tree_weight (#7100).

- add seed to `nx.generate_random_paths` (#7332).

- Allow backends to implement `should_run` (#7257).

- Adding tree broadcasting algorithm in a new module (#6928).

- Option to include initial labels in `weisfeiler_lehman_subgraph_hashes` (#6601).

- Add better error message when trying to get edge that is not present (#7245).

- Make `is_negatively_weighted` dispatchable (#7352).

- Add option to hide or show tick labels (#6018).

- ENH: Cache graphs objects when converting to a backend (#7345).

## Bug Fixes

- Fix listing of release notes on Releases page (#7030).

- Fix syntax warning from bad escape sequence (#7034).

- Fix triangles to avoid using `is` to compare nodes (#7041).

- Fix error message for `nx.mycielski_graph(0)` (#7056).

- Disallow negative number of nodes in `complete_multipartite_graph` (#7057).

- Handle edge cases for greedy_modularity_communities (#6973).

- FIX: Match the doc description while copying over data (#7092).

- fix: Include singleton/trivial paths in all_simple_paths & other functions (#6694).

- Dinitz correction (#6968).

- Modify GML test to fix invalid octal character warning (#7159).

- Fix random_spanning_tree() for single node and empty graphs (#7211).

- PlanarEmbedding.remove_edge() now updates removed edge’s neighbors (#6798).

- add seed to graph creation (#7241).

- add seed to tests of fast_label_propatation_communities (#7242).

- Fix rich_club_coefficient() for single node and empty graphs (#7212).

- Fix minimum_spanning_arborescence regression (#7280).

- Move arrowstyle input munging after intput validation (#7293).

- Fix empty GraphML attribute is not parsed (#7319).

- Add new test result to `test_asadpour_tsp` and change `linprog` method (#7335).

- Fix custom weight attribute for Mehlhorn (#6681).

## Documentation

- Update release process (#7029).

- Update convert_matrix.py (#7018).

- fix extendability function name in bipartite.rst (#7042).

- Minor doc cleanups to remove doc build warnings (#7048).

- DOC: Add example to generic_bfs_edges to demonstrate the `neighbors` param (#7072).

- Hierarchical clustering layout gallery example (#7058).

- Fixed an error in the documentation of the katz centrality (#6294).

- Create 3d_rotation_anime.py (#7025).

- DOC: Add docstrings to filter view functions (#7086).

- DOC: Add docstrings to Filter mapping views (#7075).

- DOCS: Fix internal links to other functions in isomorphvf2 (#6706).

- added note for the triangle inequality case in TSP (#6995).

- Add note about importance of testing to contributor guide (#7103).

- Proposal to add centrality overview to mentored projects (#7104).

- Improve documentation of Component Algorithms (#5473).

- Add dot io to readwrite (#5061).

- Add Python versions to release notes (#7113).

- DOC: Turn on inline plots in graph generators docstrings (#6401).

- Fix duplicate numbering in contributor guide (#7116).

- DOC: remove unnecessary ‘or’ in planted_partition_graph (#7115).

- DOC: Link methods in functions to base Graph methods/properties (#7125).

- Connect docs to doc_string for total_spanning_tree_weight (#7098).

- Image (3D RGB data) segmentation by spectral clustering with 3D illustrations (#7040).

- update triadic_census documentation for undirected graphs - issue 4386 (#7141).

- added 3d and animation to plot_greedy_coloring.py (#7090).

- DOC: fix URL econded links and doc references (#7152).

- DOC: add reference to fast_label_propagation_communities (#7167).

- updated See also sec of argmap class (#7163).

- DOC : updated examples in mincost.py (#7169).

- Document the walk_type argument default in directed_laplacian and similar functions (#7171).

- DOC: Add plots to classic graph generators docs (#7114).

- Fix a tiny typo in `structuralholes.py::local_constraint` docstring (#7198).

- Added `subgraph_is_monomorphic` and `subgraph_monomorphisms_iter` in docs (#7197).

- Fix online docs for `_dispatch` (#7194).

- DOC : Updated docs for panther_similarity (#7175).

- Fix warnings when building docs (#7195).

- Improve docs for optimal_edit_paths (#7130).

- DOC: build with nx-parallel extra documentation information (#7220).

- Fixed typo in tensor product documentation (Fixes #7228) (#7229).

- Add example for cycle detection (#6560).

- Update general_k_edge_subgraphs docstring (#7254).

- Update docstring of nonisomorphic_trees (#7255).

- adding self loops related docs and tests for functions in `cluster.py` (#7261).

- Add minimum_cycle_basis to cycle_basis See Also (#7274).

- Update CONTRIBUTING.rst (#7270).

- Fix all sphinx warnings during doc build (#7289).

- Doc infrastructure: replace `nb2plot` with `myst-nb` (#7237).

- Add explicit targets of missing modules for intersphinx (#7313).

- DOC: add doc suggestions for arbitrarily large random integers tools (#7322).

- Try/except intermittently failing basemaps in geospatial examples (#7324).

- Update docstring example with future-proof pandas assignment (#7323).

- Remove animation from spectral clustering example to improve performance (#7328).

- Doc Improvements for Approximations Files (#7338).

- Update `LCF_graph` docstring (#7262).

- Option to include initial labels in `weisfeiler_lehman_subgraph_hashes` (#6601).

- Add eriknw as contributor (#7343).

- [DOC, DISPATCH] : updated and added `backend.py`’s docs (#7305).

- add **kwargs to traveling_salesman_problem (#7371).

- Move the backend docs and connect the config docs. Both in a single sidebar entry (#7389).

## Maintenance

- Drop Python 3.9 support (#7028).

- fix: Explicitly check for None/False in edge_attr during import from np (#6825).

- Add favicon (#7043).

- Remove unused code resistance_distance (#7053).

- Fix names of small graphs (#7055).

- Improve error messages for misconfigured backend treatment (#7062).

- MAINT: Fixup union exception message (#7071).

- MAINT: Minor touchups to tadpole and lollipop graph (#7049).

- Add `@not_implemented_for("directed")` to `number_connected_components` (#7074).

- remove unused code (#7076).

- Minor touchups to the beamsearch module (#7059).

- Fix annoying split strings on same line (#7079).

- Update dispatch decorator for `hits` to use `"weight"` edge weight (#7081).

- Remove nbconvert upper pin (revert #6984) (#7083).

- Add a step to CI to check for warnings at import time (#7077).

- Added few tests for /generators/duplication.py and /generators/geomet… (#6976).

- Test on Python 3.13-dev (#7096).

- Changed arguments list of GraphMLWriterLxml.dump() (#6261).

- `write_graphml`: Small fix for object type description on `TypeError` exception (#7109).

- updated functions in `core.py` (#7027).

- label check on push and change check name (#7111).

- DEP : adding `not_implemented_for("multigraph”)` to `k_core`, `k_shell`, `k_crust` and `k_corona` (#7121).

- Add label check when pull request is edited instead of push (#7134).

- Add label workflow pull_request type synchronize and echo message (#7135).

- adding test coverage for isomorphism when using digraphs (#6417).

- Remove usage of `__networkx_plugin__` (use `__networkx_backend__` instead) (#7157).

- DOC: consistent spelling of neighbor and rename vars (#7162).

- MAINT: use ruff format instead of black (#7160).

- Ensure warnings related to changes in shortest_path returns are visible to users (#7161).

- Sync up behavior of is_{type} for empty graphs (#5849).

- Added `NodeNotFound` exceptions to `_apply_prediction` and `simrank`, and ignored isolated nodes in `panther_similarity` (#7110).

- Fix not_implemented_for decorator for is_regular and related functions (#7182).

- Fix all_node_cuts output for complete graphs (#6558).

- Remove `"networkx.plugins"` and `"networkx.plugin_info"` entry-points (#7192).

- Bump actions/setup-python from 4 to 5 (#7201).

- Update test suite for Pytest v8 (#7203).

- Undeprecate ```nx_pydot``` now that pydot is actively maintained again (#7204).

- Future-proofing and improve tests (#7209).

- Drop old dependencies per SPEC 0 (#7217).

- Update pygraphviz (#7216).

- Refactor geometric_soft_configuration_model tests for performance (#7210).

- Rename `_dispatch` to `_dispatchable` (#7193).

- Replace tempfile with tmp_path fixture in test suite (#7221).

- updated test_directed_edge_swap #5814 (#6426).

- Bump copyright year for 2024 (#7232).

- Improving test coverage for Small.py (#7260).

- Test for symmetric edge flow betweenness partition (#7251).

- MAINT : added `seed` to `gnm_random_graph` in `community/tests/test_label_propagation.py` (#7264).

- Bump scientific-python/upload-nightly-action from 0.2.0 to 0.3.0 (#7266).

- adding self loops related docs and tests for functions in `cluster.py` (#7261).

- Improving test coverage for Mycielsky.py (#7271).

- Use ruff’s docstring formatting (#7276).

- Add docstring formatting change to blame-ignore-revs (#7281).

- Improve test coverage for random_clustered and update function names (#7273).

- Doc infrastructure: replace `nb2plot` with `myst-nb` (#7237).

- Temporarily rm geospatial examples to fix CI (#7299).

- Improve test coverage for bipartite extendability (#7306).

- CI: Update scientific-python/upload-nightly-action from 0.3.0 to 0.4.0 (#7309).

- CI: Group dependabot updates (#7308).

- CI: update upload-nightly-action to 0.5.0 (#7311).

- renaming backend `func_info` dictionary’s keys (#7219).

- Add `mutates_input=` and `returns_graph=` to `_dispatchable` (#7191).

- Avoid creating results with numpy scalars (re: NEP 51) (#7282).

- Bump changelist from 0.4 to 0.5 (#7325).

- Improve test coverage for bipartite matrix.py (#7312).

- Un-dispatch coloring strategies (#7329).

- Undo change in return type of `single_target_shortest_path_length` (#7327).

- Remove animation from spectral clustering example to improve performance (#7328).

- Expire steinertree mehlhorn futurewarning (#7337).

- Update louvain test modularity comparison to leq (#7336).

- Add aaronzo as contributor (#7342).

- Fix #7339. `shortest_path` inconsisitent with warning (#7341).

- Add `nx.config` dict for configuring dispatching and backends (#7225).

- Improve test coverage for Steiner Tree & Docs (#7348).

- added `seed` to `test_richclub_normalized` (#7355).

- Add tests to link_prediction.py (#7357).

- Fix pydot tests when testing backends (#7356).

- Future proof xml parsing in graphml (#7360).

- make doc_string examples order-independent by removing np.set_printoptions (#7361).

- Close figures on test cleanup (#7373).

- More numpy scalars cleanup for numpy 2.0 (#7374).

- Update numpydoc (#7364).

- Fix pygraphviz tests causing segmentation faults in backend test (#7380).

- Add dispatching to broadcasting.py (#7386).

- Update test suite to handle when scipy is not installed (#7388).

- Rm deprecated np.row_stack in favor of vstack (#7390).

- Fix exception for `del config[key]` (#7391).

- Bump the GH actions with 3 updates (#7310).

## Contributors

54 authors added to this release (alphabetically):

- @BucketHeadP65

- @dependabot[bot]

- @nelsonaloysio

- @YVWX

- Aaron Z. (@aaronzo)

- Aditi Juneja (@Schefflera-Arboricola)

- AKSHAYA MADHURI (@akshayamadhuri)

- Alex Markham (@Alex-Markham)

- Anders Rydbirk (@anders-rydbirk)

- Andrew Knyazev (@lobpcg)

- Ayooluwa (@Ay-slim)

- Baldo (@BrunoBaldissera)

- Benjamin Edwards (@bjedwards)

- Chiranjeevi Karthik Kuruganti (@karthikchiru12)

- Chris Pryer (@cnpryer)

- d.grigonis (@dgrigonis)

- Dan Schult (@dschult)

- Daniel V. Egdal (@DanielEgdal)

- Dilara Tekinoglu (@dtekinoglu)

- Dishie Vinchhi (@Dishie2498)

- Erik Welch (@eriknw)

- Frédéric Crozatier (@fcrozatier)

- Henrik Finsberg (@finsberg)

- Jangwon Yie (@jangwon-yie)

- Jaron Lee (@jaron-lee)

- Jarrod Millman (@jarrodmillman)

- Jon Crall (@Erotemic)

- Jonas Otto (@ottojo)

- Jordan Matelsky (@j6k4m8)

- Koen van den Berk (@kalkoen)

- Luigi Sciarretta (@LuigiSciar)

- Luigi Sciarretta (@LuigiSciarretta)

- Matt Schwennesen (@mjschwenne)

- Matthew Feickert (@matthewfeickert)

- Matthieu Gouel (@matthieugouel)

- Mauricio Souza de Alencar (@mdealencar)

- Maximilian Seeliger (@max-seeli)

- Mridul Seth (@MridulS)

- Navya Agarwal (@navyagarwal)

- Neil Botelho (@NeilBotelho)

- Nihal John George (@nihalgeorge01)

- Paolo Lammens (@plammens)

- Patrick Nicodemus (@patrick-nicodemus)

- Paula Pérez Bianchi (@paulitapb)

- Purvi Chaurasia (@PurviChaurasia)

- Robert (@ImHereForTheCookies)

- Robert Jankowski (@robertjankowski)

- Ross Barnowski (@rossbar)

- Sadra Barikbin (@sadra-barikbin)

- Salim BELHADDAD (@salym)

- Till Hoffmann (@tillahoffmann)

- Vanshika Mishra (@vanshika230)

- William Black (@smokestacklightnin)

- William Zijie Zhang (@Transurgeon)

29 reviewers added to this release (alphabetically):

- @YVWX

- Aaron Z. (@aaronzo)

- Aditi Juneja (@Schefflera-Arboricola)

- AKSHAYA MADHURI (@akshayamadhuri)

- Andrew Knyazev (@lobpcg)

- Ayooluwa (@Ay-slim)

- Chiranjeevi Karthik Kuruganti (@karthikchiru12)

- Chris Pryer (@cnpryer)

- d.grigonis (@dgrigonis)

- Dan Schult (@dschult)

- Erik Welch (@eriknw)

- Frédéric Crozatier (@fcrozatier)

- Henrik Finsberg (@finsberg)

- Jarrod Millman (@jarrodmillman)

- Kyle Sunden (@ksunden)

- Matt Schwennesen (@mjschwenne)

- Mauricio Souza de Alencar (@mdealencar)

- Maximilian Seeliger (@max-seeli)

- Mridul Seth (@MridulS)

- Nihal John George (@nihalgeorge01)

- Paolo Lammens (@plammens)

- Paula Pérez Bianchi (@paulitapb)

- Rick Ratzel (@rlratzel)

- Robert Jankowski (@robertjankowski)

- Ross Barnowski (@rossbar)

- Stefan van der Walt (@stefanv)

- Vanshika Mishra (@vanshika230)

- William Black (@smokestacklightnin)

- William Zijie Zhang (@Transurgeon)

_These lists are automatically generated, and may not be complete or may contain duplicates._