matrix logarithm in connectivity.py