Skip to content
GitLab
Menu
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
9740e2f3
Commit
9740e2f3
authored
Mar 31, 2018
by
Martin Reinecke
Browse files
small enhancements
parent
ef70d560
Pipeline
#26671
passed with stages
in 11 minutes
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty4/field.py
View file @
9740e2f3
...
...
@@ -170,6 +170,11 @@ class Field(object):
"""
return
Field
(
domain
,
dobj
.
from_global_data
(
arr
))
@
staticmethod
def
from_local_data
(
domain
,
arr
):
domain
=
DomainTuple
.
make
(
domain
)
return
Field
(
domain
,
dobj
.
from_local_data
(
domain
.
shape
,
arr
))
def
to_global_data
(
self
):
"""Returns an array containing the full data of the field.
...
...
@@ -802,6 +807,24 @@ class Field(object):
def
__ipow__
(
self
,
other
):
return
self
.
_binary_helper
(
other
,
op
=
'__ipow__'
)
def
__lt__
(
self
,
other
):
return
self
.
_binary_helper
(
other
,
op
=
'__lt__'
)
def
__le__
(
self
,
other
):
return
self
.
_binary_helper
(
other
,
op
=
'__le__'
)
def
__ne__
(
self
,
other
):
return
self
.
_binary_helper
(
other
,
op
=
'__ne__'
)
def
__eq__
(
self
,
other
):
return
self
.
_binary_helper
(
other
,
op
=
'__eq__'
)
def
__ge__
(
self
,
other
):
return
self
.
_binary_helper
(
other
,
op
=
'__ge__'
)
def
__gt__
(
self
,
other
):
return
self
.
_binary_helper
(
other
,
op
=
'__gt__'
)
def
__repr__
(
self
):
return
"<nifty4.Field>"
...
...
nifty4/library/wiener_filter_curvature.py
View file @
9740e2f3
...
...
@@ -40,4 +40,4 @@ def WienerFilterCurvature(R, N, S, inverter):
The minimizer to use during numerical inversion
"""
op
=
SandwichOperator
(
R
,
N
.
inverse
)
+
S
.
inverse
return
InversionEnabler
(
op
,
inverter
,
S
.
times
)
return
InversionEnabler
(
op
,
inverter
,
S
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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