Commit 7920af86 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'fix_op_expm1' into 'NIFTy_5'

Define `log1p` and `expm1` as acting on OP-chains

See merge request !376
parents 7ac5e74c 209e095c
Pipeline #64615 passed with stages
in 24 minutes and 41 seconds
...@@ -158,8 +158,8 @@ class Operator(metaclass=NiftyMeta): ...@@ -158,8 +158,8 @@ class Operator(metaclass=NiftyMeta):
return None, self return None, self
for f in ["sqrt", "exp", "log", "tanh", "sigmoid", 'sin', 'cos', 'tan', for f in ["sqrt", "exp", "log", "sin", "cos", "tan", "sinh", "cosh", "tanh",
'sinh', 'cosh', 'absolute', 'sinc', 'one_over', 'log10']: "sinc", "sigmoid", "absolute", "one_over", "log10", "log1p", "expm1"]:
def func(f): def func(f):
def func2(self): def func2(self):
fa = _FunctionApplier(self.target, f) fa = _FunctionApplier(self.target, f)
......
...@@ -335,7 +335,7 @@ def test_emptydomain(): ...@@ -335,7 +335,7 @@ def test_emptydomain():
@pmp('dom', [ift.RGSpace((8,), harmonic=True), ()]) @pmp('dom', [ift.RGSpace((8,), harmonic=True), ()])
@pmp('func', [ @pmp('func', [
"exp", "log", "sin", "cos", "tan", "sinh", "cosh", "sinc", "absolute", "exp", "log", "sin", "cos", "tan", "sinh", "cosh", "sinc", "absolute",
"sign", "log10" "sign", "log10", "log1p", "expm1"
]) ])
def test_funcs(num, dom, func): def test_funcs(num, dom, func):
num = 5 num = 5
......
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