netneurotools.metrics.degrees_dir

netneurotools.metrics.degrees_dir(W)[source]

Compute the in degree and out degree of each node in W.

Parameters:

W ((N, N) array_like) – Unweighted, directed connection weight array. Weighted array will be binarized prior to calculation.

Returns:

  • deg_in ((N,) numpy.ndarray) – In-degree (column sum) of each node in W

  • deg_out ((N,) numpy.ndarray) – Out-degree (row sum) of each node in W

  • deg ((N,) numpy.ndarray) – Degree (in-degree + out-degree) of each node in W