Skip to content

Turn any AI agent into an AI Scientist. The #1 Agent Skills library for science, used by 250,000+ scientists worldwide. 177 ready-to-use validated skills plus 100+ scientific databases covering biology, chemistry, medicine, and drug discovery. Compatible with Cursor, Claude Code, Codex, Pi, Antigravity, and the open Agent Skills standard.

6.1 KB
Raw Blame

NetworkX 3.7 review and validation

Reviewed 2026-10-01 against the released NetworkX 3.7 wheel and official stable reference, not the development latest documentation. Python requires >=3.12 and excludes 3.14.1. Record the installed version in each analysis.

Executed scope

The repository suite tests/networkx/test_examples.py executes documentation recipes against synthetic graphs and temporary files. Its checks cover:

  • Weighted route/length agreement, inward directed closeness, connectivity preconditions, matching cardinality versus weight, flows, traversal, induced subgraph matching, clustering, centrality and community objectives.
  • All generator code blocks, including degree-sequence preservation before simplification, current bipartite keywords and ordered-DAG isolate retention.
  • Dense/sparse zero-weight edges, labels and directedness; parallel-edge keys and isolates through node-link JSON; GraphML types; GML/GEXF/Pajek topology; adjacency/tree/Cytoscape JSON; CSV rejection cases; compressed adjacency lists; local SQL and dense/sparse Matrix Market input.
  • Matplotlib drawing blocks with a noninteractive backend, Plotly figure schema, standalone PyVis HTML without browser launch or mutation of the source graph, and a synthetic projected GeoPandas/momepy shapefile round trip.

Test stack: Python 3.13.3, NetworkX 3.7, NumPy 2.5.3, SciPy 1.18.1, pandas 3.0.6, Matplotlib 3.11.2, Plotly 7.1.0, PyVis 0.3.2, GeoPandas 1.2.0 and momepy 1.0.0. Run from the repository:

python tests/run_all.py --isolated networkx

The audit also resolved every referenced NetworkX symbol (excluding names explicitly described as removed) and bound every documented NetworkX function call against released signatures. Signature checks do not prove runtime behavior for arbitrary data, graph classes or backends.

Scientific and interoperability limits

Reference snippets are illustrative API patterns where they need user files, preexisting graph variables or optional engines; they are not one sequential program. Graphviz/pydot/pygraphviz rendering, LEDA input, accelerated backends and interactive browser/notebook behavior were documentation-reviewed only. No large empirical network or scientific null-ensemble inference was performed. Numerical/serialization tests establish these local contracts, not biological, social, causal or predictive validity.

  • A weight called weight is not inherently a distance. Explicitly select cost/distance versus transition/interaction strength and validate missing, zero, negative and nonfinite values for the chosen method.
  • Degree-preserving null graphs require preservation of the relevant graph class and constraints. A simple projection of a configuration multigraph changes its degrees. Seeded outputs do not establish unbiased sampling, adequate mixing, community significance or a fitted power-law distribution.
  • Conversion success does not imply complete preservation. Save node order, isolates, IDs, graph class, multiedge keys and supported attribute schemas; check them after a round trip. A matrix typically sums parallel weights.
  • A projected CRS can use feet or other units. momepy lengths use those units; projection suitability and a conversion to metres are separate decisions.
  • Layout coordinates, marker size and color are presentation choices. Keep seeds, weight semantics, legends and mappings with the output.

Official sources