scglue.num.vertex_degrees
- scglue.num.vertex_degrees(eidx, ewt, vnum=None, direction='both')[源代码]
Compute vertex degrees
- 参数:
eidx (
numpy.ndarray
) – Vertex indices of edges (\(2 \times n_{edges}\))ewt (
numpy.ndarray
) – Weight of edges (\(n_{edges}\))vnum (
typing.Optional
[int
]) – Total number of vertices (determined by max edge index if not specified)direction (
str
) – Direction of vertex degree, should be one of {“in”, “out”, “both”}
- 返回类型:
- 返回:
degrees – Vertex degrees