def mntd(distmat):
 return masked_array(distmat, eye(distmat.shape[0])).min(0).mean()

def mntd ( distmat ) : return masked_array ( distmat , eye ( distmat . shape [ 0 ] ) ) . min ( 0 ) . mean ( )
find mean of row mins in hollow .