Commit 4dbfec46 authored by Martin Reinecke's avatar Martin Reinecke

small tweaks

parent abd52d28
......@@ -616,9 +616,9 @@ class Field(object):
if np.isscalar(spaces):
return self.domain[spaces].scalar_weight()
res = 1.
if spaces is None:
spaces = range(len(self.domain))
res = 1.
for i in spaces:
tmp = self.domain[i].scalar_weight()
if tmp is None:
......@@ -723,7 +723,7 @@ class Field(object):
Returns
-------
norm : scalar
norm : float
The L2-norm of the field values.
"""
......
......@@ -99,12 +99,12 @@ def cast_axis_to_tuple(axis, length=None):
def parse_domain(domain):
from .domain_object import DomainObject
if domain is None:
domain = ()
elif isinstance(domain, DomainObject):
domain = (domain,)
elif not isinstance(domain, tuple):
domain = tuple(domain)
return ()
if isinstance(domain, DomainObject):
return (domain,)
if not isinstance(domain, tuple):
domain = tuple(domain)
for d in domain:
if not isinstance(d, DomainObject):
raise TypeError(
......
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