diff --git a/fastkde/fastKDE.py b/fastkde/fastKDE.py index 4852134..d9fa2cf 100644 --- a/fastkde/fastKDE.py +++ b/fastkde/fastKDE.py @@ -471,7 +471,7 @@ def applyBernacchiaFilter(self,doFlushArrays=True): if(self.doSaveTransformedKernel): self.kappaSC = kappaSC - midPointAccessor = tuple([(tp-1)/2 for tp in self.numTPoints]) + midPointAccessor = tuple([(tp-1)//2 for tp in self.numTPoints]) #Calculate the transform of the self-consistent density estimate self.phiSC[iCalcPhi] = self.ECF[iCalcPhi]*kappaSC[iCalcPhi] @@ -549,7 +549,7 @@ def normFunc(delta): if(self.beVerbose): normConst = sum(pdf*prod(self.deltaX)) - midPointAccessor = tuple([(tp-1)/2 for tp in self.numTPoints]) + midPointAccessor = tuple([(tp-1)//2 for tp in self.numTPoints]) print("Normalization of pdf = {}. phiSC[0] = {}".format(normConst,self.phiSC[midPointAccessor])) @@ -839,7 +839,7 @@ def reApplyFilter(self,pdf): #Transform the PDF to fourier space phiTilde_tmp = fft.fftshift(fft.ifftn(fft.ifftshift(ma.filled(pdf,0.0)))) #Normalize the transform - midPointAccessor = tuple([(tp-1)/2 for tp in self.numTPoints]) + midPointAccessor = tuple([(tp-1)//2 for tp in self.numTPoints]) phiTilde_tmp /= phiTilde_tmp[midPointAccessor] #Reapply the filter