mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
networkx: complete the link_analysis algorithms module (#14627)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete, SupportsGetItem
|
||||
from collections.abc import Mapping
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
@@ -10,6 +10,6 @@ def hits(
|
||||
G: Graph[_Node],
|
||||
max_iter: int | None = 100,
|
||||
tol: float | None = 1e-08,
|
||||
nstart: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
nstart: Mapping[_Node, float] | None = None,
|
||||
normalized: bool = True,
|
||||
): ...
|
||||
) -> tuple[dict[_Node, float], dict[_Node, float]]: ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete, SupportsGetItem
|
||||
from collections.abc import Collection
|
||||
from collections.abc import Collection, Mapping
|
||||
|
||||
import numpy as np
|
||||
from networkx._typing import Array2D
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@@ -10,19 +11,19 @@ __all__ = ["pagerank", "google_matrix"]
|
||||
def pagerank(
|
||||
G: Graph[_Node],
|
||||
alpha: float | None = 0.85,
|
||||
personalization: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
personalization: Mapping[_Node, float] | None = None,
|
||||
max_iter: int | None = 100,
|
||||
tol: float | None = 1e-06,
|
||||
nstart: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
nstart: Mapping[_Node, float] | None = None,
|
||||
weight: str | None = "weight",
|
||||
dangling: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
) -> dict[Incomplete, float]: ...
|
||||
dangling: Mapping[_Node, float] | None = None,
|
||||
) -> dict[_Node, float]: ...
|
||||
@_dispatchable
|
||||
def google_matrix(
|
||||
G: Graph[_Node],
|
||||
alpha: float = 0.85,
|
||||
personalization: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
personalization: Mapping[_Node, float] | None = None,
|
||||
nodelist: Collection[_Node] | None = None,
|
||||
weight: str | None = "weight",
|
||||
dangling: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
): ...
|
||||
dangling: Mapping[_Node, float] | None = None,
|
||||
) -> Array2D[np.float64]: ...
|
||||
|
||||
Reference in New Issue
Block a user