def mutual_incoherence(X_relevant, X_irelevant):
 projector = np.dot(np.dot(X_irelevant.T, X_relevant), pinvh(np.dot(X_relevant.T, X_relevant)))
 return np.max(np.abs(projector).sum(axis=1))

def mutual_incoherence ( X_relevant , X_irelevant ) : projector = np . dot ( np . dot ( X_irelevant . T , X_relevant ) , pinvh ( np . dot ( X_relevant . T , X_relevant ) ) ) return np . max ( np . abs ( projector ) . sum ( axis = 1 ) )
mutual incoherence .