#8575·networkx

Review the threshold graph tools in NetworkX

Author: dschultCreated Mar 18, 2026Updated Jul 14, 2026
LabelsDiscussion

The threshold graph tools in networkx (algorithms/threshold.py) have been neglected over the years. Some functions (like spectral_projection see #8572) are not tested. And its not clear that many of the functions should be retained.

The goal of the set of functions is/was to provide a way to approximate large complex networks with threshold graph networks allowing a way to get approximate properties and dynamics using the cheap algorithms for e.g. eigenvectors. I doubt that threshold graphs are useful as exact representations (diameter is <= 2). And while computing many network properties is fast that doesn't mean they are good approximations of more complicated networks.

We should remove or update the code in this module.