Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
c01a3e4a
Commit
c01a3e4a
authored
May 23, 2017
by
Theo Steininger
Browse files
Removed p from Field.norm
parent
d8c9ccc5
Pipeline
#12819
passed with stages
in 12 minutes and 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/field.py
View file @
c01a3e4a
...
...
@@ -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.
...
...
nifty/operators/smoothing_operator/smoothing_operator.py
View file @
c01a3e4a
...
...
@@ -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
,
...
...
Theo Steininger
@theos
mentioned in issue
#130 (closed)
·
May 23, 2017
mentioned in issue
#130 (closed)
mentioned in issue #130
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment