diff --git a/ravenframework/SupervisedLearning/GaussPolynomialRom.py b/ravenframework/SupervisedLearning/GaussPolynomialRom.py index 695a6162b6..04abfca25f 100644 --- a/ravenframework/SupervisedLearning/GaussPolynomialRom.py +++ b/ravenframework/SupervisedLearning/GaussPolynomialRom.py @@ -465,9 +465,7 @@ def __trainLocal__(self,featureVals,targetVals): missing.append(pt) if len(missing)>0: msg='\n' - msg+='DEBUG missing feature vals:\n' - for i in missing: - msg+=' '+str(i)+'\n' + msg+='DEBUG missing feature vals:\n' + '\n'.join(map(lambda x:' '+str(x),missing))+ '\n' self.raiseADebug(msg) self.raiseADebug('sparse:',sgs) self.raiseADebug('solns :',fvs) diff --git a/ravenframework/SupervisedLearning/MSR.py b/ravenframework/SupervisedLearning/MSR.py index aaa33d75d6..f2c22cbb89 100644 --- a/ravenframework/SupervisedLearning/MSR.py +++ b/ravenframework/SupervisedLearning/MSR.py @@ -552,9 +552,7 @@ def __evaluateLocal__(self,featureVals): ############# ## OR ############# - weights[key] = 0 - for idx in indices: - weights[key] += self.__kernel(dists[:,idx]/h) + weights[key] = np.sum([self.__kernel(dists[:,idx]/h) for idx in indices], axis=0) weights[key] ############# diff --git a/ravenframework/contrib/pyDOE/var_regression_matrix.py b/ravenframework/contrib/pyDOE/var_regression_matrix.py index 7ae5549178..2108159d62 100755 --- a/ravenframework/contrib/pyDOE/var_regression_matrix.py +++ b/ravenframework/contrib/pyDOE/var_regression_matrix.py @@ -47,5 +47,5 @@ def var_regression_matrix(H, x, model, sigma=1): raise ValueError("model and DOE don't suit together") x_mod = build_regression_matrix(x, model) - var = sigma**2*np.dot(np.dot(x_mod.T, np.linalg.inv(np.dot(H.T, H))), x_mod) + var = sigma**2*np.linalg.multi_dot([x_mod.T, np.linalg.inv(np.dot(H.T, H)), x_mod]) return var