diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2019-04-15 14:20:57 +0100 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2019-04-15 14:20:57 +0100 |
commit | f1e095e530c0e06007344fbd3f40bf4dcad9686c (patch) | |
tree | d94965c6e35b739729cda877debc822656e8b3ed /Wrappers | |
parent | f17322dbb13d6ef03cc73646ef3f32deb11d7cda (diff) | |
download | framework-f1e095e530c0e06007344fbd3f40bf4dcad9686c.tar.gz framework-f1e095e530c0e06007344fbd3f40bf4dcad9686c.tar.bz2 framework-f1e095e530c0e06007344fbd3f40bf4dcad9686c.tar.xz framework-f1e095e530c0e06007344fbd3f40bf4dcad9686c.zip |
update ZeroFun to ZeroFunction
Diffstat (limited to 'Wrappers')
-rwxr-xr-x | Wrappers/Python/ccpi/optimisation/algorithms/FISTA.py | 6 | ||||
-rw-r--r-- | Wrappers/Python/test/test_functions.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/algorithms/FISTA.py b/Wrappers/Python/ccpi/optimisation/algorithms/FISTA.py index 93ba178..064cb33 100755 --- a/Wrappers/Python/ccpi/optimisation/algorithms/FISTA.py +++ b/Wrappers/Python/ccpi/optimisation/algorithms/FISTA.py @@ -6,7 +6,7 @@ Created on Thu Feb 21 11:07:30 2019 """ from ccpi.optimisation.algorithms import Algorithm -from ccpi.optimisation.functions import ZeroFun +from ccpi.optimisation.functions import ZeroFunction import numpy class FISTA(Algorithm): @@ -46,11 +46,11 @@ class FISTA(Algorithm): # default inputs if f is None: - self.f = ZeroFun() + self.f = ZeroFunction() else: self.f = f if g is None: - g = ZeroFun() + g = ZeroFunction() self.g = g else: self.g = g diff --git a/Wrappers/Python/test/test_functions.py b/Wrappers/Python/test/test_functions.py index 22721fa..05bdd7a 100644 --- a/Wrappers/Python/test/test_functions.py +++ b/Wrappers/Python/test/test_functions.py @@ -26,7 +26,7 @@ from ccpi.optimisation.funcs import Norm2sq # from ccpi.optimisation.functions.L2NormSquared import SimpleL2NormSq, L2NormSq # from ccpi.optimisation.functions.L1Norm import SimpleL1Norm, L1Norm #from ccpi.optimisation.functions import mixed_L12Norm -from ccpi.optimisation.functions import ZeroFun +from ccpi.optimisation.functions import ZeroFunction from ccpi.optimisation.functions import FunctionOperatorComposition import unittest @@ -329,7 +329,7 @@ class TestFunction(unittest.TestCase): a1 = f_no_scaled(U) a2 = f_scaled(U) - self.assertAlmostEqual(a1,a2) + self.assertNumpyArrayAlmostEqual(a1.as_array(),a2.as_array()) tmp = [ el**2 for el in U.containers ] |