use integer division
@@ -110,8 +110,8 @@ def _polypow(x, n):
if n == 1:
return x
if n % 2 == 0:
- return _polypow(cupy.convolve(x, x), n / 2)
- return cupy.convolve(x, _polypow(cupy.convolve(x, x), (n - 1) / 2))
+ return _polypow(cupy.convolve(x, x), n // 2)
+ return cupy.convolve(x, _polypow(cupy.convolve(x, x), (n - 1) // 2))
def polyval(p, x):
