Commit 4356aae3 authored by Martin Reinecke's avatar Martin Reinecke

tweak

parent 036aafce
......@@ -54,7 +54,9 @@ class MultiField(object):
if domain is None:
domain = MultiDomain.make({key: v._domain
for key, v in dict.items()})
return MultiField(domain, tuple(dict[key] for key in domain.keys()))
res = tuple(dict[key] if key in dict else Field.full(dom, 0)
for key, dom in zip(domain.keys(), domain.domains()))
return MultiField(domain, res)
def to_dict(self):
return {key: val for key, val in zip(self._domain.keys(), self._val)}
......
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