Commit eedc1f38 authored by Martin Reinecke's avatar Martin Reinecke

use relative imports for all NIFTy-internal modules

parent 1297585d
......@@ -16,7 +16,7 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from nifty.nifty_meta import NiftyMeta
from ..nifty_meta import NiftyMeta
from keepers import Loggable
from future.utils import with_metaclass
......
......@@ -1123,7 +1123,7 @@ class Field(Loggable, Versionable, object):
else:
# create a diagonal operator which is capable of taking care of the
# axes-matching
from nifty.operators.diagonal_operator import DiagonalOperator
from .operators.diagonal_operator import DiagonalOperator
diagonal = y.val.conjugate()
diagonalOperator = DiagonalOperator(domain=y.domain,
diagonal=diagonal,
......
......@@ -16,7 +16,7 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from nifty.domain_object import DomainObject
from ..domain_object import DomainObject
class FieldType(DomainObject):
......
from nifty.operators.endomorphic_operator import EndomorphicOperator
from nifty.operators.invertible_operator_mixin import InvertibleOperatorMixin
from nifty.operators.diagonal_operator import DiagonalOperator
from ...operators.endomorphic_operator import EndomorphicOperator
from ...operators.invertible_operator_mixin import InvertibleOperatorMixin
from ...operators.diagonal_operator import DiagonalOperator
class CriticalPowerCurvature(InvertibleOperatorMixin, EndomorphicOperator):
......
from ...energies.energy import Energy
from ...operators.smoothness_operator import SmoothnessOperator
from . import CriticalPowerCurvature
from ...energies.memoization import memo
from nifty.energies.energy import Energy
from nifty.operators.smoothness_operator import SmoothnessOperator
from nifty.library.critical_filter import CriticalPowerCurvature
from nifty.energies.memoization import memo
from nifty.sugar import generate_posterior_sample
from nifty import Field, exp
from ...sugar import generate_posterior_sample
from ... import Field, exp
class CriticalPowerEnergy(Energy):
......
from nifty.operators import EndomorphicOperator,\
from ...operators import EndomorphicOperator,\
InvertibleOperatorMixin
from nifty.energies.memoization import memo
from nifty.basic_arithmetics import clipped_exp
from nifty.sugar import create_composed_fft_operator
from ...energies.memoization import memo
from ...basic_arithmetics import clipped_exp
from ...sugar import create_composed_fft_operator
class LogNormalWienerFilterCurvature(InvertibleOperatorMixin,
......
from nifty.energies.energy import Energy
from nifty.energies.memoization import memo
from nifty.library.log_normal_wiener_filter import \
LogNormalWienerFilterCurvature
from nifty.sugar import create_composed_fft_operator
from ...energies.energy import Energy
from ...energies.memoization import memo
from . import LogNormalWienerFilterCurvature
from ...sugar import create_composed_fft_operator
class LogNormalWienerFilterEnergy(Energy):
......
from nifty.operators import EndomorphicOperator,\
InvertibleOperatorMixin
from ...operators import EndomorphicOperator,\
InvertibleOperatorMixin
class WienerFilterCurvature(InvertibleOperatorMixin, EndomorphicOperator):
......
from nifty.energies.energy import Energy
from nifty.energies.memoization import memo
from nifty.library.wiener_filter import WienerFilterCurvature
from ...energies.energy import Energy
from ...energies.memoization import memo
from . import WienerFilterCurvature
class WienerFilterEnergy(Energy):
......
......@@ -18,7 +18,7 @@
from __future__ import division
import abc
from nifty.nifty_meta import NiftyMeta
from ..nifty_meta import NiftyMeta
import numpy as np
......
......@@ -20,7 +20,7 @@ import abc
from keepers import Loggable
from nifty import LineEnergy
from ...energies import LineEnergy
from future.utils import with_metaclass
......
......@@ -96,7 +96,7 @@ def cast_axis_to_tuple(axis, length=None):
def parse_domain(domain):
from nifty.domain_object import DomainObject
from .domain_object import DomainObject
if domain is None:
domain = ()
elif isinstance(domain, DomainObject):
......
......@@ -17,9 +17,8 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from builtins import object
from nifty.minimization import ConjugateGradient
from nifty.field import Field
from ...minimization import ConjugateGradient
from ...field import Field
class InvertibleOperatorMixin(object):
......
......@@ -17,11 +17,11 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import numpy as np
from nifty.field import Field
from nifty.spaces.power_space import PowerSpace
from nifty.operators.endomorphic_operator import EndomorphicOperator
from nifty import sqrt
import nifty.nifty_utilities as utilities
from ...field import Field
from ...spaces.power_space import PowerSpace
from ..endomorphic_operator import EndomorphicOperator
from ... import sqrt
from ... import nifty_utilities as utilities
class LaplaceOperator(EndomorphicOperator):
......
......@@ -18,11 +18,11 @@
from builtins import str
import abc
from nifty.nifty_meta import NiftyMeta
from ...nifty_meta import NiftyMeta
from keepers import Loggable
from nifty.field import Field
import nifty.nifty_utilities as utilities
from ...field import Field
from ... import nifty_utilities as utilities
from future.utils import with_metaclass
......
......@@ -19,9 +19,8 @@
from builtins import range
import numpy as np
from nifty.field import Field
from nifty.operators.endomorphic_operator import EndomorphicOperator
from ...field import Field
from ..endomorphic_operator import EndomorphicOperator
class ProjectionOperator(EndomorphicOperator):
......
from builtins import range
import numpy as np
from nifty import Field,\
FieldArray
from nifty.operators.linear_operator import LinearOperator
from nifty.operators.smoothing_operator import SmoothingOperator
from nifty.operators.composed_operator import ComposedOperator
from nifty.operators.diagonal_operator import DiagonalOperator
from ... import Field,\
FieldArray
from ..linear_operator import LinearOperator
from ..smoothing_operator import SmoothingOperator
from ..composed_operator import ComposedOperator
from ..diagonal_operator import DiagonalOperator
class ResponseOperator(LinearOperator):
......
from nifty.spaces.power_space import PowerSpace
from nifty.operators.endomorphic_operator import EndomorphicOperator
from nifty.operators.laplace_operator import LaplaceOperator
from ...spaces.power_space import PowerSpace
from ..endomorphic_operator import EndomorphicOperator
from ..laplace_operator import LaplaceOperator
class SmoothnessOperator(EndomorphicOperator):
......
......@@ -21,10 +21,9 @@ from builtins import range
from builtins import object
import numpy as np
from nifty.field import Field
import nifty.nifty_utilities as utilities
from nifty import nifty_configuration as nc
from ...field import Field
from ... import nifty_utilities as utilities
from ... import nifty_configuration as nc
from d2o import STRATEGIES as DISTRIBUTION_STRATEGIES
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment