def getWeights(self, KpMat):
    condNumber = self.getConditionNumber(KpMat)
    z = KpMat.shape[0]
    KPrime = (KpMat + ((condNumber * z) * np.identity(z)))
    num = np.matmul(np.ones(z), np.linalg.inv(KPrime))
    denom = (1 + np.matmul(num, np.ones(z)))
    weights = (num / denom)
    weights = (weights / sum(weights))
    return weights
def getWeights(self, KpMat):
    condNumber = self.getConditionNumber(KpMat)
    z = KpMat.shape[0]
    KPrime = (KpMat + ((condNumber * z) * np.identity(z)))
    num = np.matmul(np.ones(z), np.linalg.inv(KPrime))
    denom = (1 + np.matmul(num, np.ones(z)))
    weights = (num / denom)
    weights = (weights / sum(weights))
    return weights