Commit c01a3e4a authored by Theo Steininger's avatar Theo Steininger

Removed p from Field.norm

parent d8c9ccc5
Pipeline #12819 passed with stages
in 12 minutes and 22 seconds
......@@ -1054,7 +1054,7 @@ class Field(Loggable, Versionable, object):
dotted = diagonalOperator(x, spaces=spaces)
return dotted.sum(spaces=spaces)
def norm(self, q=2):
def norm(self):
""" Computes the Lq-norm of the field values.
Parameters
......@@ -1068,11 +1068,7 @@ class Field(Loggable, Versionable, object):
The Lq-norm of the field values.
"""
if q == 2:
return (self.dot(x=self)) ** (1 / 2)
else:
return self.dot(x=self ** (q - 1)) ** (1 / q)
return np.sqrt(np.abs(self.dot(x=self)))
def conjugate(self, inplace=False):
""" Retruns the complex conjugate of the field.
......
......@@ -39,11 +39,12 @@ class SmoothingOperator(EndomorphicOperator):
can only live on one space or FieldType
sigma : float
Sets the length of the Gaussian convolution kernel
log_distances : boolean
States whether the convolution happens on the logarithmic grid or not.
log_distances : boolean *optional*
States whether the convolution happens on the logarithmic grid or not
(default: False).
default_spaces : tuple of ints *optional*
Defines on which space(s) of a given field the Operator acts by
default (default: None)
default (default: None).
Attributes
----------
......@@ -117,7 +118,6 @@ class SmoothingOperator(EndomorphicOperator):
raise NotImplementedError("For the given Space smoothing "
" is not available.")
else:
print 'new 4'
return super(SmoothingOperator, cls).__new__(cls,
domain,
*args,
......
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