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
8f98a8f3
Commit
8f98a8f3
authored
Jan 06, 2018
by
Martin Reinecke
Browse files
Issue
#207
: raise an exception for currently unsupported cases
parent
e51e8754
Pipeline
#23392
passed with stage
in 4 minutes and 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/field.py
View file @
8f98a8f3
...
...
@@ -423,13 +423,19 @@ class Field(object):
return
self
.
_contraction_helper
(
'max'
,
spaces
)
def
mean
(
self
,
spaces
=
None
):
return
self
.
_contraction_helper
(
'mean'
,
spaces
)
if
self
.
scalar_weight
(
spaces
)
is
not
None
:
return
self
.
_contraction_helper
(
'mean'
,
spaces
)
raise
NotImplementedError
def
var
(
self
,
spaces
=
None
):
return
self
.
_contraction_helper
(
'var'
,
spaces
)
if
self
.
scalar_weight
(
spaces
)
is
not
None
:
return
self
.
_contraction_helper
(
'var'
,
spaces
)
raise
NotImplementedError
def
std
(
self
,
spaces
=
None
):
return
self
.
_contraction_helper
(
'std'
,
spaces
)
if
self
.
scalar_weight
(
spaces
)
is
not
None
:
return
self
.
_contraction_helper
(
'std'
,
spaces
)
return
sqrt
(
self
.
var
(
spaces
))
def
copy_content_from
(
self
,
other
):
if
not
isinstance
(
other
,
Field
):
...
...
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