reduce

Import in python using from mcot.core._scripts.surface.gradient import reduce

mcot.core._scripts.surface.gradient.reduce(distance, method='median')[source]

Summarises a NxN sparse matrix of distances as a (N, ) array of distances

Parameters:distance – (N, N) sparse matrix of distances between neighbouring vertices
Returns:(N, ) array with the summarised distance