brainconn.utils.matrix.normalize

normalize(W, copy=True)[source]

Normalizes an input weighted connection matrix. If copy is not set, this function will modify W in place.

Parameters:
  • W (numpy.ndarray) – weighted connectivity matrix
  • copy (bool) – if True, returns a copy of the matrix. Otherwise, modifies the matrix in place. Default value=True.
Returns:

W – normalized connectivity matrix

Return type:

numpy.ndarray