Skip to content

Commit

Permalink
BUG: avoid circular import in default_functionals
Browse files Browse the repository at this point in the history
  • Loading branch information
kohr-h committed Mar 13, 2018
1 parent a9fc714 commit f8fcef7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion odl/solvers/functional/default_functionals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f8fcef7

Please sign in to comment.