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
4b8a2cd0
Commit
4b8a2cd0
authored
Nov 28, 2019
by
Martin Reinecke
Browse files
Merge branch 'nifty6_fix_op_expm1' into 'NIFTy_6'
Add log1p and expm1 to sugar.py and operator.py See merge request
!381
parents
af021fd3
ab0d57b4
Pipeline
#64597
passed with stages
in 10 minutes and 29 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/operators/operator.py
View file @
4b8a2cd0
...
...
@@ -158,8 +158,8 @@ class Operator(metaclass=NiftyMeta):
return
None
,
self
for
f
in
[
"sqrt"
,
"exp"
,
"log"
,
"
tanh"
,
"sigmoid
"
,
'
sin
'
,
'
cos
'
,
'
tan
'
,
'
sin
h'
,
'cosh'
,
'
absolute
'
,
'sinc'
,
'
one_over
'
,
'
log10
'
]:
for
f
in
[
"sqrt"
,
"exp"
,
"log"
,
"
sin"
,
"cos"
,
"tan
"
,
"
sin
h"
,
"
cos
h"
,
"
tan
h"
,
"
sin
c"
,
"sigmoid"
,
"
absolute
"
,
"
one_over
"
,
"
log10
"
,
"log1p"
,
"expm1"
]:
def
func
(
f
):
def
func2
(
self
):
fa
=
_FunctionApplier
(
self
.
target
,
f
)
...
...
nifty6/sugar.py
View file @
4b8a2cd0
...
...
@@ -36,7 +36,7 @@ __all__ = ['PS_field', 'power_analyze', 'create_power_operator',
'full'
,
'from_global_data'
,
'from_local_data'
,
'makeDomain'
,
'sqrt'
,
'exp'
,
'log'
,
'tanh'
,
'sigmoid'
,
'sin'
,
'cos'
,
'tan'
,
'sinh'
,
'cosh'
,
'log10'
,
'absolute'
,
'one_over'
,
'clip'
,
'sinc'
,
'absolute'
,
'one_over'
,
'clip'
,
'sinc'
,
"log1p"
,
"expm1"
,
'conjugate'
,
'get_signal_variance'
,
'makeOp'
,
'domain_union'
,
'get_default_codomain'
,
'single_plot'
]
...
...
test/test_field.py
View file @
4b8a2cd0
...
...
@@ -335,7 +335,7 @@ def test_emptydomain():
@
pmp
(
'dom'
,
[
ift
.
RGSpace
((
8
,),
harmonic
=
True
),
()])
@
pmp
(
'func'
,
[
"exp"
,
"log"
,
"sin"
,
"cos"
,
"tan"
,
"sinh"
,
"cosh"
,
"sinc"
,
"absolute"
,
"sign"
,
"log10"
"sign"
,
"log10"
,
"log1p"
,
"expm1"
])
def
test_funcs
(
num
,
dom
,
func
):
num
=
5
...
...
Write
Preview
Supports
Markdown
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