-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add networkx stubs #10544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add networkx stubs #10544
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
afa3c9c
Add networkx
rhelmot 9155998
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] adfc9f9
Update stubs/networkx/networkx/readwrite/graphml.pyi
rhelmot 7173ae0
Update stubs/networkx/networkx/algorithms/flow/maxflow.pyi
rhelmot cf6dad5
Update stubs/networkx/networkx/algorithms/boundary.pyi
rhelmot 3884ce6
Update stubs/networkx/networkx/classes/function.pyi
rhelmot 3d116d9
Update stubs/networkx/networkx/classes/reportviews.pyi
rhelmot d84fba0
Update stubs/networkx/networkx/classes/graph.pyi
rhelmot b79c591
Update stubs/networkx/networkx/algorithms/bridges.pyi
rhelmot 423a35e
Update stubs/networkx/METADATA.toml
rhelmot 76d4b6f
Update stubs/networkx/networkx/algorithms/tree/branchings.pyi
rhelmot 90c991f
Update stubs/networkx/networkx/algorithms/tree/branchings.pyi
rhelmot cb02f2c
Fix typevar names
rhelmot 83e9077
Nuke extra incompletes
rhelmot 05daed0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9c6f2ee
Remove redundant Incomplete and ellipses (#2)
Avasam 8a17cca
Adress PR comments, fix mypy and pyright issues (#3)
Avasam 7355586
Fix stubtest "is not present at runtime" issues (#4)
Avasam ebef107
Work around stubuploader issue (#6)
Avasam 34d72ae
Run stubdefaulter; closes #5
rhelmot db33680
Fix invalid default `None` values (#7)
Avasam 6228903
Fixing all stubtest errors left (#8)
Avasam 6aa2fce
fix pytype issues (#9)
Avasam 284482b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 391234e
Fix reportviews metaclasses
rhelmot 73c4bb6
Improve fidelity of interfaces in convert_matrix
rhelmot e80965c
Update stubs/networkx/networkx/convert_matrix.pyi
rhelmot cfa3ff6
Improve two create_using cases
rhelmot c5cefbb
Improve fidelity of graphviews
rhelmot 97822cb
Specify generic arguments for _Edge
rhelmot cdc358e
Batch apply simple suggestions from code review
Avasam e074379
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ddcb1b5
Fix imports and types after batch suggestions
Avasam ea04db6
Fix new Y059, Y060 violations
Avasam f17307e
Reduce unbound TypeVar declarations, reuse _Node
Avasam 1941eb8
Applied further suggestions
Avasam 1239536
Add comment to `view_pygraphviz`'s `edgelabel` param
Avasam a4d8ebc
Merge branch 'main' into main
Avasam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| version = "3.1" | ||
| upstream_repository = "https://github.com/networkx/networkx" | ||
| requires = ["numpy"] | ||
| partial_stub = true | ||
rhelmot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [tool.stubtest] | ||
| ignore_missing_stub = true | ||
| # stub_uploader won't allow pandas-stubs in the requires field https://github.com/typeshed-internal/stub_uploader/issues/90 | ||
| stubtest_requirements = ["pandas"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| from networkx.algorithms import * | ||
| from networkx.classes import * | ||
| from networkx.classes import filters as filters | ||
| from networkx.convert import * | ||
| from networkx.convert_matrix import * | ||
| from networkx.drawing import * | ||
| from networkx.exception import * | ||
| from networkx.generators import * | ||
| from networkx.linalg import * | ||
| from networkx.readwrite import * | ||
| from networkx.relabel import * | ||
|
|
||
| from . import ( | ||
| algorithms as algorithms, | ||
| classes as classes, | ||
| convert as convert, | ||
| convert_matrix as convert_matrix, | ||
| drawing as drawing, | ||
| generators as generators, | ||
| linalg as linalg, | ||
| readwrite as readwrite, | ||
| relabel as relabel, | ||
| utils as utils, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| from networkx.algorithms import ( | ||
| approximation as approximation, | ||
| assortativity as assortativity, | ||
| bipartite as bipartite, | ||
| centrality as centrality, | ||
| chordal as chordal, | ||
| clique as clique, | ||
| cluster as cluster, | ||
| coloring as coloring, | ||
| community as community, | ||
| components as components, | ||
| connectivity as connectivity, | ||
| flow as flow, | ||
| isomorphism as isomorphism, | ||
| link_analysis as link_analysis, | ||
| lowest_common_ancestors as lowest_common_ancestors, | ||
| node_classification as node_classification, | ||
| operators as operators, | ||
| shortest_paths as shortest_paths, | ||
| tournament as tournament, | ||
| traversal as traversal, | ||
| tree as tree, | ||
| ) | ||
| from networkx.algorithms.assortativity import * | ||
| from networkx.algorithms.asteroidal import * | ||
| from networkx.algorithms.bipartite import ( | ||
| complete_bipartite_graph as complete_bipartite_graph, | ||
| is_bipartite as is_bipartite, | ||
| projected_graph as projected_graph, | ||
| ) | ||
| from networkx.algorithms.boundary import * | ||
| from networkx.algorithms.bridges import * | ||
| from networkx.algorithms.centrality import * | ||
| from networkx.algorithms.chains import * | ||
| from networkx.algorithms.chordal import * | ||
| from networkx.algorithms.clique import * | ||
| from networkx.algorithms.cluster import * | ||
| from networkx.algorithms.coloring import * | ||
| from networkx.algorithms.communicability_alg import * | ||
| from networkx.algorithms.components import * | ||
| from networkx.algorithms.connectivity import ( | ||
| all_node_cuts as all_node_cuts, | ||
| all_pairs_node_connectivity as all_pairs_node_connectivity, | ||
| average_node_connectivity as average_node_connectivity, | ||
| edge_connectivity as edge_connectivity, | ||
| edge_disjoint_paths as edge_disjoint_paths, | ||
| is_k_edge_connected as is_k_edge_connected, | ||
| k_components as k_components, | ||
| k_edge_augmentation as k_edge_augmentation, | ||
| k_edge_components as k_edge_components, | ||
| k_edge_subgraphs as k_edge_subgraphs, | ||
| minimum_edge_cut as minimum_edge_cut, | ||
| minimum_node_cut as minimum_node_cut, | ||
| node_connectivity as node_connectivity, | ||
| node_disjoint_paths as node_disjoint_paths, | ||
| stoer_wagner as stoer_wagner, | ||
| ) | ||
| from networkx.algorithms.core import * | ||
| from networkx.algorithms.covering import * | ||
| from networkx.algorithms.cuts import * | ||
| from networkx.algorithms.cycles import * | ||
| from networkx.algorithms.d_separation import * | ||
| from networkx.algorithms.dag import * | ||
| from networkx.algorithms.distance_measures import * | ||
| from networkx.algorithms.distance_regular import * | ||
| from networkx.algorithms.dominance import * | ||
| from networkx.algorithms.dominating import * | ||
| from networkx.algorithms.efficiency_measures import * | ||
| from networkx.algorithms.euler import * | ||
| from networkx.algorithms.flow import ( | ||
| capacity_scaling as capacity_scaling, | ||
| cost_of_flow as cost_of_flow, | ||
| gomory_hu_tree as gomory_hu_tree, | ||
| max_flow_min_cost as max_flow_min_cost, | ||
| maximum_flow as maximum_flow, | ||
| maximum_flow_value as maximum_flow_value, | ||
| min_cost_flow as min_cost_flow, | ||
| min_cost_flow_cost as min_cost_flow_cost, | ||
| minimum_cut as minimum_cut, | ||
| minimum_cut_value as minimum_cut_value, | ||
| network_simplex as network_simplex, | ||
| ) | ||
| from networkx.algorithms.graph_hashing import * | ||
| from networkx.algorithms.graphical import * | ||
| from networkx.algorithms.hierarchy import * | ||
| from networkx.algorithms.hybrid import * | ||
| from networkx.algorithms.isolate import * | ||
| from networkx.algorithms.isomorphism import ( | ||
| could_be_isomorphic as could_be_isomorphic, | ||
| fast_could_be_isomorphic as fast_could_be_isomorphic, | ||
| faster_could_be_isomorphic as faster_could_be_isomorphic, | ||
| is_isomorphic as is_isomorphic, | ||
| ) | ||
| from networkx.algorithms.isomorphism.vf2pp import * | ||
| from networkx.algorithms.link_analysis import * | ||
| from networkx.algorithms.link_prediction import * | ||
| from networkx.algorithms.lowest_common_ancestors import * | ||
| from networkx.algorithms.matching import * | ||
| from networkx.algorithms.minors import * | ||
| from networkx.algorithms.mis import * | ||
| from networkx.algorithms.moral import * | ||
| from networkx.algorithms.non_randomness import * | ||
| from networkx.algorithms.operators import * | ||
| from networkx.algorithms.planar_drawing import * | ||
| from networkx.algorithms.planarity import * | ||
| from networkx.algorithms.polynomials import * | ||
| from networkx.algorithms.reciprocity import * | ||
| from networkx.algorithms.regular import * | ||
| from networkx.algorithms.richclub import * | ||
| from networkx.algorithms.shortest_paths import * | ||
| from networkx.algorithms.similarity import * | ||
| from networkx.algorithms.simple_paths import * | ||
| from networkx.algorithms.smallworld import * | ||
| from networkx.algorithms.smetric import * | ||
| from networkx.algorithms.sparsifiers import * | ||
| from networkx.algorithms.structuralholes import * | ||
| from networkx.algorithms.summarization import * | ||
| from networkx.algorithms.swap import * | ||
| from networkx.algorithms.traversal import * | ||
| from networkx.algorithms.tree.branchings import ( | ||
| ArborescenceIterator as ArborescenceIterator, | ||
| maximum_branching as maximum_branching, | ||
| maximum_spanning_arborescence as maximum_spanning_arborescence, | ||
| minimum_branching as minimum_branching, | ||
| minimum_spanning_arborescence as minimum_spanning_arborescence, | ||
| ) | ||
| from networkx.algorithms.tree.coding import * | ||
| from networkx.algorithms.tree.decomposition import * | ||
| from networkx.algorithms.tree.mst import * | ||
| from networkx.algorithms.tree.operations import * | ||
| from networkx.algorithms.tree.recognition import * | ||
| from networkx.algorithms.triads import * | ||
| from networkx.algorithms.vitality import * | ||
| from networkx.algorithms.voronoi import * | ||
| from networkx.algorithms.wiener import * |
13 changes: 13 additions & 0 deletions
13
stubs/networkx/networkx/algorithms/approximation/__init__.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| from networkx.algorithms.approximation.clique import * | ||
| from networkx.algorithms.approximation.clustering_coefficient import * | ||
| from networkx.algorithms.approximation.connectivity import * | ||
| from networkx.algorithms.approximation.distance_measures import * | ||
| from networkx.algorithms.approximation.dominating_set import * | ||
| from networkx.algorithms.approximation.kcomponents import * | ||
| from networkx.algorithms.approximation.matching import * | ||
| from networkx.algorithms.approximation.maxcut import * | ||
| from networkx.algorithms.approximation.ramsey import * | ||
| from networkx.algorithms.approximation.steinertree import * | ||
| from networkx.algorithms.approximation.traveling_salesman import * | ||
| from networkx.algorithms.approximation.treewidth import * | ||
| from networkx.algorithms.approximation.vertex_cover import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| def maximum_independent_set(G): ... | ||
| def max_clique(G): ... | ||
| def clique_removal(G): ... | ||
| def large_clique_size(G): ... |
3 changes: 3 additions & 0 deletions
3
stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def average_clustering(G, trials: int = 1000, seed: Incomplete | None = None): ... |
5 changes: 5 additions & 0 deletions
5
stubs/networkx/networkx/algorithms/approximation/connectivity.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def local_node_connectivity(G, source, target, cutoff: Incomplete | None = None): ... | ||
| def node_connectivity(G, s: Incomplete | None = None, t: Incomplete | None = None): ... | ||
| def all_pairs_node_connectivity(G, nbunch: Incomplete | None = None, cutoff: Incomplete | None = None): ... |
3 changes: 3 additions & 0 deletions
3
stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def diameter(G, seed: Incomplete | None = None): ... |
4 changes: 4 additions & 0 deletions
4
stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def min_weighted_dominating_set(G, weight: Incomplete | None = None): ... | ||
| def min_edge_dominating_set(G): ... |
1 change: 1 addition & 0 deletions
1
stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| def k_components(G, min_density: float = 0.95): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| def min_maximal_matching(G): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def randomized_partitioning(G, seed: Incomplete | None = None, p: float = 0.5, weight: Incomplete | None = None): ... | ||
| def one_exchange(G, initial_cut: Incomplete | None = None, seed: Incomplete | None = None, weight: Incomplete | None = None): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| def ramsey_R2(G): ... |
4 changes: 4 additions & 0 deletions
4
stubs/networkx/networkx/algorithms/approximation/steinertree.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def metric_closure(G, weight: str = "weight"): ... | ||
| def steiner_tree(G, terminal_nodes, weight: str = "weight", method: Incomplete | None = None): ... |
33 changes: 33 additions & 0 deletions
33
stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def christofides(G, weight: str = "weight", tree: Incomplete | None = None): ... | ||
| def traveling_salesman_problem( | ||
| G, weight: str = "weight", nodes: Incomplete | None = None, cycle: bool = True, method: Incomplete | None = None | ||
| ): ... | ||
| def asadpour_atsp(G, weight: str = "weight", seed: Incomplete | None = None, source: Incomplete | None = None): ... | ||
| def greedy_tsp(G, weight: str = "weight", source: Incomplete | None = None): ... | ||
| def simulated_annealing_tsp( | ||
| G, | ||
| init_cycle, | ||
| weight: str = "weight", | ||
| source: Incomplete | None = None, | ||
| # docstring says int, but it can be a float and does become a float mid-equation if alpha is also a float | ||
| temp: float = 100, | ||
| move: str = "1-1", | ||
| max_iterations: int = 10, | ||
| N_inner: int = 100, | ||
| alpha: float = 0.01, | ||
| seed: Incomplete | None = None, | ||
| ): ... | ||
| def threshold_accepting_tsp( | ||
| G, | ||
| init_cycle, | ||
| weight: str = "weight", | ||
| source: Incomplete | None = None, | ||
| threshold: float = 1, | ||
| move: str = "1-1", | ||
| max_iterations: int = 10, | ||
| N_inner: int = 100, | ||
| alpha: float = 0.1, | ||
| seed: Incomplete | None = None, | ||
| ): ... |
11 changes: 11 additions & 0 deletions
11
stubs/networkx/networkx/algorithms/approximation/treewidth.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| __all__ = ["treewidth_min_degree", "treewidth_min_fill_in"] | ||
|
|
||
| def treewidth_min_degree(G): ... | ||
| def treewidth_min_fill_in(G): ... | ||
|
|
||
| class MinDegreeHeuristic: | ||
| count: Incomplete | ||
| def __init__(self, graph) -> None: ... | ||
| def best_node(self, graph): ... |
3 changes: 3 additions & 0 deletions
3
stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def min_weighted_vertex_cover(G, weight: Incomplete | None = None): ... |
5 changes: 5 additions & 0 deletions
5
stubs/networkx/networkx/algorithms/assortativity/__init__.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from networkx.algorithms.assortativity.connectivity import * | ||
| from networkx.algorithms.assortativity.correlation import * | ||
| from networkx.algorithms.assortativity.mixing import * | ||
| from networkx.algorithms.assortativity.neighbor_degree import * | ||
| from networkx.algorithms.assortativity.pairs import * |
5 changes: 5 additions & 0 deletions
5
stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def average_degree_connectivity( | ||
| G, source: str = "in+out", target: str = "in+out", nodes: Incomplete | None = None, weight: Incomplete | None = None | ||
| ): ... |
10 changes: 10 additions & 0 deletions
10
stubs/networkx/networkx/algorithms/assortativity/correlation.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def degree_assortativity_coefficient( | ||
| G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None | ||
| ): ... | ||
| def degree_pearson_correlation_coefficient( | ||
| G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None | ||
| ): ... | ||
| def attribute_assortativity_coefficient(G, attribute, nodes: Incomplete | None = None): ... | ||
| def numeric_assortativity_coefficient(G, attribute, nodes: Incomplete | None = None): ... |
19 changes: 19 additions & 0 deletions
19
stubs/networkx/networkx/algorithms/assortativity/mixing.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def attribute_mixing_dict(G, attribute, nodes: Incomplete | None = None, normalized: bool = False): ... | ||
| def attribute_mixing_matrix( | ||
| G, attribute, nodes: Incomplete | None = None, mapping: Incomplete | None = None, normalized: bool = True | ||
| ): ... | ||
| def degree_mixing_dict( | ||
| G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None, normalized: bool = False | ||
| ): ... | ||
| def degree_mixing_matrix( | ||
| G, | ||
| x: str = "out", | ||
| y: str = "in", | ||
| weight: Incomplete | None = None, | ||
| nodes: Incomplete | None = None, | ||
| normalized: bool = True, | ||
| mapping: Incomplete | None = None, | ||
| ): ... | ||
| def mixing_dict(xy, normalized: bool = False): ... |
5 changes: 5 additions & 0 deletions
5
stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def average_neighbor_degree( | ||
| G, source: str = "out", target: str = "out", nodes: Incomplete | None = None, weight: Incomplete | None = None | ||
| ): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| from _typeshed import Incomplete | ||
| from collections.abc import Generator | ||
|
|
||
| def node_attribute_xy(G, attribute, nodes: Incomplete | None = None) -> Generator[Incomplete, None, None]: ... | ||
| def node_degree_xy( | ||
| G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None | ||
| ) -> Generator[Incomplete, None, None]: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| def find_asteroidal_triple(G): ... | ||
| def is_at_free(G): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| from networkx.algorithms.bipartite.basic import * | ||
| from networkx.algorithms.bipartite.centrality import * | ||
| from networkx.algorithms.bipartite.cluster import * | ||
| from networkx.algorithms.bipartite.covering import * | ||
| from networkx.algorithms.bipartite.edgelist import * | ||
| from networkx.algorithms.bipartite.generators import * | ||
| from networkx.algorithms.bipartite.matching import * | ||
| from networkx.algorithms.bipartite.matrix import * | ||
| from networkx.algorithms.bipartite.projection import * | ||
| from networkx.algorithms.bipartite.redundancy import * | ||
| from networkx.algorithms.bipartite.spectral import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def color(G): ... | ||
| def is_bipartite(G): ... | ||
| def is_bipartite_node_set(G, nodes): ... | ||
| def sets(G, top_nodes: Incomplete | None = None): ... | ||
| def density(B, nodes): ... | ||
| def degrees(B, nodes, weight: Incomplete | None = None): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| def degree_centrality(G, nodes): ... | ||
| def betweenness_centrality(G, nodes): ... | ||
| def closeness_centrality(G, nodes, normalized: bool = True): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def latapy_clustering(G, nodes: Incomplete | None = None, mode: str = "dot"): ... | ||
|
|
||
| clustering = latapy_clustering | ||
|
|
||
| def average_clustering(G, nodes: Incomplete | None = None, mode: str = "dot"): ... | ||
| def robins_alexander_clustering(G): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| from _typeshed import Incomplete | ||
|
|
||
| def min_edge_cover(G, matching_algorithm: Incomplete | None = None): ... |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.