diff --git a/test/testkiss.py b/test/testkiss.py index 39d98ae..64809bf 100755 --- a/test/testkiss.py +++ b/test/testkiss.py @@ -4,7 +4,7 @@ # # SPDX-License-Identifier: BSD-3-Clause # See COPYING file for more information. - +from __future__ import division,print_function import math import sys import os @@ -50,7 +50,7 @@ def dopack(x,cpx=1): return s def dounpack(x,cpx): - uf = fmt * ( len(x) / struct.calcsize(fmt) ) + uf = fmt * ( len(x) // struct.calcsize(fmt) ) s = struct.unpack(uf,x) if cpx: return numpy.array(s[::2]) + numpy.array( s[1::2] )*1j @@ -99,12 +99,12 @@ def test_fft(ndims): errpow = numpy.vdot(errf,errf)+1e-10 sigpow = numpy.vdot(xverf,xverf)+1e-10 snr = 10*math.log10(abs(sigpow/errpow) ) - print 'SNR (compared to NumPy) : %.1fdB' % float(snr) + print( 'SNR (compared to NumPy) : {0:.1f}dB'.format( float(snr) ) ) if snr