code: def _inv_sqrtm(x):
    '''Computes x^(-1/2)'''
    vals, vecs = np.linalg.eigh(x)
    return (vecs / np.sqrt(vals)).dot(vecs.Tf _inv_sqrtm(x):
    '''Computes x^(-1/2)'''
    vals, vecs = np.linalg.eigh(x)
    return (vecs / np.sqrt(vals)).dot(vecs.T)
docs: Computes x^(-1/2)