diff --git a/casacore/functionals/functional.py b/casacore/functionals/functional.py
index <HASH>..<HASH> 100644
--- a/casacore/functionals/functional.py
+++ b/casacore/functionals/functional.py
@@ -146,7 +146,7 @@ class functional(_functional):
         if len(retval) == n:
             return numpy.array(retval)
         return numpy.array(retval).reshape(self.npar() + 1,
-                                           n / self.ndim()).transpose()
+                                           n // self.ndim()).transpose()
 
     def add(self, other):
         if not isinstance(other, functional):
diff --git a/tests/test_functionals.py b/tests/test_functionals.py
index <HASH>..<HASH> 100644
--- a/tests/test_functionals.py
+++ b/tests/test_functionals.py
@@ -1,5 +1,5 @@
 import unittest2 as unittest
-from pyrap.functionals import *
+from casacore.functionals import *
 
 
 class TestFunctionals(unittest.TestCase):
fixed the integer division bug in functionals