Commit 64c5adae authored by Martin Reinecke's avatar Martin Reinecke
Browse files

fix type errors

parent a33c8989
Pipeline #14209 failed with stage
in 5 minutes and 4 seconds
......@@ -802,7 +802,7 @@ class Field(Loggable, Versionable, object):
dim_tuple = tuple(sp.dim for sp in self.domain)
try:
return reduce(lambda x, y: x * y, dim_tuple)
return int(reduce(lambda x, y: x * y, dim_tuple))
except TypeError:
return 0
......
......@@ -201,7 +201,7 @@ class RGSpace(Space):
@property
def dim(self):
return reduce(lambda x, y: x*y, self.shape)
return int(reduce(lambda x, y: x*y, self.shape))
@property
def total_volume(self):
......
......@@ -31,6 +31,10 @@ class SpaceSerializationTests(unittest.TestCase):
import h5py
except ImportError:
raise SkipTest
try:
os.remove('test.h5')
except:
pass
repo = Repository('test.h5')
repo.add(space, 'space')
repo.commit()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment