From 6bfd886bb6cc91e7aaaef2f3b90e8039be172e31 Mon Sep 17 00:00:00 2001 From: Holger Kohr Date: Mon, 25 Jun 2018 23:25:32 +0200 Subject: [PATCH] DOC/TST: fix various doctest failures --- odl/solvers/util/callback.py | 2 +- odl/tomo/geometry/conebeam.py | 10 ++-------- odl/tomo/geometry/parallel.py | 10 ++-------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/odl/solvers/util/callback.py b/odl/solvers/util/callback.py index 31f333b296d..e18cccd40c2 100644 --- a/odl/solvers/util/callback.py +++ b/odl/solvers/util/callback.py @@ -173,7 +173,7 @@ def __repr__(self): >>> callback = odl.solvers.CallbackPrint() >>> operator = odl.ScalingOperator(r3, 2.0) >>> callback * operator - CallbackPrint() * ScalingOperator(rn(3), 2.0) + CallbackPrint() * ScalingOperator(rn(3), scalar=2.0) """ return '{!r} * {!r}'.format(self.callback, self.operator) diff --git a/odl/tomo/geometry/conebeam.py b/odl/tomo/geometry/conebeam.py index 31578f60c08..93092b870d1 100644 --- a/odl/tomo/geometry/conebeam.py +++ b/odl/tomo/geometry/conebeam.py @@ -533,10 +533,7 @@ def __getitem__(self, indices): >>> geom[::2, :] FanFlatGeometry( - nonuniform_partition( - [ 0.5, 2.5], - min_pt=0.0, max_pt=4.0 - ), + nonuniform_partition([ 0.5, 2.5], min_pt=0.0, max_pt=4.0), uniform_partition(-1.0, 1.0, 20), src_radius=50.0, det_radius=100.0 @@ -1183,10 +1180,7 @@ def __getitem__(self, indices): >>> geom[::2] ConeFlatGeometry( - nonuniform_partition( - [ 0.5, 2.5], - min_pt=0.0, max_pt=4.0 - ), + nonuniform_partition([ 0.5, 2.5], min_pt=0.0, max_pt=4.0), uniform_partition([-1., -1.], [ 1., 1.], (20, 20)), src_radius=50.0, det_radius=100.0, diff --git a/odl/tomo/geometry/parallel.py b/odl/tomo/geometry/parallel.py index 84e45a732ad..a078e39c803 100644 --- a/odl/tomo/geometry/parallel.py +++ b/odl/tomo/geometry/parallel.py @@ -682,10 +682,7 @@ def __getitem__(self, indices): >>> geom[::2] Parallel2dGeometry( - nonuniform_partition( - [ 0.5, 2.5], - min_pt=0.0, max_pt=4.0 - ), + nonuniform_partition([ 0.5, 2.5], min_pt=0.0, max_pt=4.0), uniform_partition(-1.0, 1.0, 20) ) """ @@ -1446,10 +1443,7 @@ def __getitem__(self, indices): >>> geom[::2] Parallel3dAxisGeometry( - nonuniform_partition( - [ 0.5, 2.5], - min_pt=0.0, max_pt=4.0 - ), + nonuniform_partition([ 0.5, 2.5], min_pt=0.0, max_pt=4.0), uniform_partition([-1., -1.], [ 1., 1.], (20, 20)) ) """