summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2019-06-03 11:18:23 -0400
committerEdoardo Pasca <edo.paskino@gmail.com>2019-06-03 11:18:23 -0400
commit8787adfef38ded4852b53a6d7812bb7d4f888d86 (patch)
tree54ad86fea0c681ccf9306ff051afe7221489bfe1
parent97a45ae06f9bc95f9df640158e16f522d356392d (diff)
downloadframework-8787adfef38ded4852b53a6d7812bb7d4f888d86.tar.gz
framework-8787adfef38ded4852b53a6d7812bb7d4f888d86.tar.bz2
framework-8787adfef38ded4852b53a6d7812bb7d4f888d86.tar.xz
framework-8787adfef38ded4852b53a6d7812bb7d4f888d86.zip
fix import and calls in tests
-rw-r--r--Wrappers/Python/test/test_functions.py6
-rwxr-xr-xWrappers/Python/test/test_run_test.py10
2 files changed, 8 insertions, 8 deletions
diff --git a/Wrappers/Python/test/test_functions.py b/Wrappers/Python/test/test_functions.py
index af419c7..523008d 100644
--- a/Wrappers/Python/test/test_functions.py
+++ b/Wrappers/Python/test/test_functions.py
@@ -20,7 +20,7 @@ from ccpi.optimisation.operators import Gradient
from ccpi.optimisation.functions import L2NormSquared
from ccpi.optimisation.functions import L1Norm, MixedL21Norm
-from ccpi.optimisation.functions import Norm2sq
+from ccpi.optimisation.functions import Norm2Sq
from ccpi.optimisation.functions import ZeroFunction
from ccpi.optimisation.functions import FunctionOperatorComposition
@@ -298,7 +298,7 @@ class TestFunction(unittest.TestCase):
b = ig.allocate(ImageGeometry.RANDOM_INT)
A = 0.5 * Identity(ig)
- old_chisq = Norm2sq(A, b, 1.0)
+ old_chisq = Norm2Sq(A, b, 1.0)
new_chisq = FunctionOperatorComposition(A, L2NormSquared(b=b))
yold = old_chisq(u)
@@ -364,4 +364,4 @@ class TestFunction(unittest.TestCase):
proxc = f.proximal_conjugate(x,1.2)
f.proximal_conjugate(x, 1.2, out=out)
- numpy.testing.assert_array_equal(proxc.as_array(), out.as_array()) \ No newline at end of file
+ numpy.testing.assert_array_equal(proxc.as_array(), out.as_array())
diff --git a/Wrappers/Python/test/test_run_test.py b/Wrappers/Python/test/test_run_test.py
index 9b4d53b..a6c13f4 100755
--- a/Wrappers/Python/test/test_run_test.py
+++ b/Wrappers/Python/test/test_run_test.py
@@ -8,7 +8,7 @@ from ccpi.framework import ImageGeometry
from ccpi.framework import AcquisitionGeometry
from ccpi.optimisation.algorithms import FISTA
#from ccpi.optimisation.algs import FBPD
-from ccpi.optimisation.functions import Norm2sq
+from ccpi.optimisation.functions import Norm2Sq
from ccpi.optimisation.functions import ZeroFunction
from ccpi.optimisation.funcs import Norm1
from ccpi.optimisation.funcs import Norm2
@@ -80,7 +80,7 @@ class TestAlgorithms(unittest.TestCase):
lam = 10
opt = {'memopt': True}
# Create object instances with the test data A and b.
- f = Norm2sq(A, b, c=0.5, memopt=True)
+ f = Norm2Sq(A, b, c=0.5, memopt=True)
g0 = ZeroFunction()
# Initial guess
@@ -144,7 +144,7 @@ class TestAlgorithms(unittest.TestCase):
lam = 10
opt = {'memopt': True}
# Create object instances with the test data A and b.
- f = Norm2sq(A, b, c=0.5, memopt=True)
+ f = Norm2Sq(A, b, c=0.5, memopt=True)
g0 = ZeroFunction()
# Initial guess
@@ -218,7 +218,7 @@ class TestAlgorithms(unittest.TestCase):
x_init = DataContainer(np.random.randn(n, 1))
# Create object instances with the test data A and b.
- f = Norm2sq(A, b, c=0.5, memopt=True)
+ f = Norm2Sq(A, b, c=0.5, memopt=True)
f.L = LinearOperator.PowerMethod(A, 25, x_init)[0]
print ("Lipschitz", f.L)
g0 = ZeroFun()
@@ -286,7 +286,7 @@ class TestAlgorithms(unittest.TestCase):
y.array = y.array + 0.1*np.random.randn(N, N)
# Data fidelity term
- f_denoise = Norm2sq(I, y, c=0.5, memopt=True)
+ f_denoise = Norm2Sq(I, y, c=0.5, memopt=True)
x_init = ImageData(geometry=ig)
f_denoise.L = LinearOperator.PowerMethod(I, 25, x_init)[0]