brainconn.modularity.ci2ls

ci2ls(ci)[source]

Convert from a community index vector to a 2D python list of modules The list is a pure python list, not requiring numpy.

Parameters:
  • ci (Nx1 numpy.ndarray) – the community index vector
  • zeroindexed (bool) – If True, ci uses zero-indexing (lowest value is 0). Defaults to False.
Returns:

ls – pure python list with lowest value zero-indexed (regardless of zero-indexing parameter)

Return type:

listof(list)