From af50c49dbf46f870a59789d4c64dac990b1a322b Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Thu, 17 Aug 2017 10:06:16 +0200 Subject: [PATCH] Fix to fftw --- python/cosmotool/fftw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cosmotool/fftw.py b/python/cosmotool/fftw.py index da0c094..0ba51bf 100644 --- a/python/cosmotool/fftw.py +++ b/python/cosmotool/fftw.py @@ -10,7 +10,7 @@ class CubeFT(object): self.align = pyfftw.simd_alignment self.L = float(L) self.max_cpu = multiprocessing.cpu_count() if max_cpu < 0 else max_cpu - self._dhat = pyfftw.n_byte_align_empty((self.N,self.N,self.N/2+1), self.align, dtype='complex64') + self._dhat = pyfftw.n_byte_align_empty((self.N,self.N,self.N//2+1), self.align, dtype='complex64') self._density = pyfftw.n_byte_align_empty((self.N,self.N,self.N), self.align, dtype='float32') self._irfft = pyfftw.FFTW(self._dhat, self._density, axes=(0,1,2), direction='FFTW_BACKWARD', threads=self.max_cpu)#, normalize_idft=False) self._rfft = pyfftw.FFTW(self._density, self._dhat, axes=(0,1,2), threads=self.max_cpu) #, normalize_idft=False)