summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2019-04-16 07:30:20 -0400
committerEdoardo Pasca <edo.paskino@gmail.com>2019-04-16 07:30:20 -0400
commit7f3e0399e605ae2411cababfba4846500890ec10 (patch)
tree70d0950e3418ab1227b6917bc1f42d2b67c3ef56 /Wrappers
parentf5077318f11935f1c6c66855ffb34195be8739b7 (diff)
downloadframework-7f3e0399e605ae2411cababfba4846500890ec10.tar.gz
framework-7f3e0399e605ae2411cababfba4846500890ec10.tar.bz2
framework-7f3e0399e605ae2411cababfba4846500890ec10.tar.xz
framework-7f3e0399e605ae2411cababfba4846500890ec10.zip
use Identity
Diffstat (limited to 'Wrappers')
-rw-r--r--Wrappers/Python/test/test_BlockOperator.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/Wrappers/Python/test/test_BlockOperator.py b/Wrappers/Python/test/test_BlockOperator.py
index 601a58c..b82c849 100644
--- a/Wrappers/Python/test/test_BlockOperator.py
+++ b/Wrappers/Python/test/test_BlockOperator.py
@@ -1,17 +1,11 @@
import unittest
from ccpi.optimisation.operators import BlockOperator
from ccpi.framework import BlockDataContainer
-from ccpi.optimisation.ops import Identity
+from ccpi.optimisation.operators import Identity
from ccpi.framework import ImageGeometry, ImageData
import numpy
from ccpi.optimisation.operators import FiniteDiff
-class TestOperator(Identity):
- def __init__(self, *args, **kwargs):
- super(TestOperator, self).__init__(*args, **kwargs)
- self.range = kwargs.get('range', self.geometry)
- def range_geometry(self):
- return self.range
class TestBlockOperator(unittest.TestCase):
@@ -70,8 +64,8 @@ class TestBlockOperator(unittest.TestCase):
ImageGeometry(10,22,31) , \
ImageGeometry(10,20,31) ]
x = [ g.allocate() for g in ig ]
- ops = [ TestOperator(g, range=r) for g,r in zip(ig, rg0) ]
- ops += [ TestOperator(g, range=r) for g,r in zip(ig, rg1) ]
+ ops = [ Identity(g, gm_range=r) for g,r in zip(ig, rg0) ]
+ ops += [ Identity(g, gm_range=r) for g,r in zip(ig, rg1) ]
K = BlockOperator(*ops, shape=(2,3))
print ("K col comp? " , K.column_wise_compatible())