From f8fcef7aa02bb6b50dc5753d0a6e5113555a606f Mon Sep 17 00:00:00 2001 From: Holger Kohr Date: Tue, 13 Mar 2018 22:40:45 +0100 Subject: [PATCH] BUG: avoid circular import in default_functionals --- odl/solvers/functional/default_functionals.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/odl/solvers/functional/default_functionals.py b/odl/solvers/functional/default_functionals.py index 58da2b626db..4bfb97a6bc6 100644 --- a/odl/solvers/functional/default_functionals.py +++ b/odl/solvers/functional/default_functionals.py @@ -26,7 +26,6 @@ proximal_convex_conj_l1_l2, proximal_convex_conj_l2, proximal_huber, proximal_l1, proximal_l1_l2, proximal_l2, proximal_l2_squared) from odl.space import ProductSpace -from odl.ufunc_ops import exp from odl.util import ( REPR_PRECISION, conj_exponent, moveaxis, npy_printoptions, repr_string, signature_string_parts) @@ -1779,6 +1778,8 @@ def _call(self, x): @property def gradient(self): """Gradient operator of the functional.""" + # Avoid circular import + from odl.ufunc_ops import exp if self.prior is None: return exp(self.domain) else: