diff --git a/pyKriging/coKriging.py b/pyKriging/coKriging.py index 3f98506..f4120bd 100644 --- a/pyKriging/coKriging.py +++ b/pyKriging/coKriging.py @@ -111,9 +111,9 @@ def distanceXcXe(self): def updatePsi(self): - self.PsicXc = np.zeros((self.nc,self.nc), dtype=np.float) - self.PsicXe = np.zeros((self.ne,self.ne), dtype=np.float) - self.PsicXcXe = np.zeros((self.nc,self.ne), dtype=np.float) + self.PsicXc = np.zeros((self.nc,self.nc), dtype=float) + self.PsicXe = np.zeros((self.ne,self.ne), dtype=float) + self.PsicXcXe = np.zeros((self.nc,self.ne), dtype=float) # # print self.thetac # print self.pc diff --git a/pyKriging/krige.py b/pyKriging/krige.py index ead9883..079da05 100644 --- a/pyKriging/krige.py +++ b/pyKriging/krige.py @@ -208,7 +208,7 @@ def expimp(self, x): y_min = np.min(self.y) if S <= 0.: EI = 0. - elif S > 0.: + else: EI_one = ((y_min - self.predict_normalized(x)) * (0.5 + 0.5*m.erf(( 1./np.sqrt(2.))*((y_min - self.predict_normalized(x)) / S)))) @@ -223,7 +223,7 @@ def weightedexpimp(self, x, w): y_min = np.min(self.y) if S <= 0.: EI = 0. - elif S > 0.: + else: EI_one = w*((y_min - self.predict_normalized(x)) * (0.5 + 0.5*m.erf((1./np.sqrt(2.))*((y_min - self.predict_normalized(x)) / S)))) diff --git a/pyKriging/matrixops.py b/pyKriging/matrixops.py index 2cdb5c4..df75258 100644 --- a/pyKriging/matrixops.py +++ b/pyKriging/matrixops.py @@ -6,7 +6,7 @@ class matrixops(): def __init__(self): self.LnDetPsi = None - self.Psi = np.zeros((self.n,self.n), dtype=np.float) + self.Psi = np.zeros((self.n,self.n), dtype=float) self.psi = np.zeros((self.n,1)) self.one = np.ones(self.n) self.mu = None @@ -22,7 +22,7 @@ def updateData(self): self.distance[i,j]= np.abs((self.X[i]-self.X[j])) def updatePsi(self): - self.Psi = np.zeros((self.n,self.n), dtype=np.float) + self.Psi = np.zeros((self.n,self.n), dtype=float) self.one = np.ones(self.n) self.psi = np.zeros((self.n,1)) newPsi = np.exp(-np.sum(self.theta*np.power(self.distance,self.pl), axis=2)) @@ -32,7 +32,7 @@ def updatePsi(self): self.U = self.U.T def regupdatePsi(self): - self.Psi = np.zeros((self.n,self.n), dtype=np.float) + self.Psi = np.zeros((self.n,self.n), dtype=float) self.one = np.ones(self.n) self.psi = np.zeros((self.n,1)) newPsi = np.exp(-np.sum(self.theta*np.power(self.distance,self.pl), axis=2)) @@ -107,4 +107,4 @@ def regression_predicterr_normalized(self,x): pass SSqr = np.abs(SSqr[0]) - return np.power(SSqr,0.5)[0] \ No newline at end of file + return np.power(SSqr,0.5)[0]