Commit dbd58167 authored by Philipp Arras's avatar Philipp Arras

Reorder imports and delete unused imports

parent 5b0e1b78
......@@ -17,8 +17,8 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from .compat import *
from .compat import *
try:
from mpi4py import MPI
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from .compat import *
from .domains.domain import Domain
......
......@@ -17,11 +17,12 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from .compat import *
import numpy as np
from . import utilities
from . import dobj, utilities
from .compat import *
from .domain_tuple import DomainTuple
from . import dobj
class Field(object):
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from .compat import *
......
......@@ -17,9 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from .minimizer import Minimizer
from ..logger import logger
from .minimizer import Minimizer
class ConjugateGradient(Minimizer):
......
......@@ -17,11 +17,13 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import abc
from .minimizer import Minimizer
from .line_search_strong_wolfe import LineSearchStrongWolfe
from ..compat import *
from ..logger import logger
from .line_search_strong_wolfe import LineSearchStrongWolfe
from .minimizer import Minimizer
class DescentMinimizer(Minimizer):
......
......@@ -17,9 +17,8 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..field import Field
from ..utilities import NiftyMetaBase, memo
......
......@@ -17,8 +17,9 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..utilities import memo, my_lincomb_simple, my_lincomb
from ..utilities import memo, my_lincomb, my_lincomb_simple
from .energy import Energy
......
......@@ -17,9 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from .iteration_controller import IterationController
from ..logger import logger
from .iteration_controller import IterationController
class GradientNormController(IterationController):
......
......@@ -17,8 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import abc
from ..compat import *
from ..utilities import NiftyMetaBase
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..logger import logger
from .descent_minimizer import DescentMinimizer
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
......
......@@ -17,8 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import abc
from ..compat import *
from ..utilities import NiftyMetaBase
......
......@@ -17,11 +17,13 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from .line_search import LineSearch
from .line_energy import LineEnergy
from ..compat import *
from ..logger import logger
from .line_energy import LineEnergy
from .line_search import LineSearch
class LineSearchStrongWolfe(LineSearch):
......
......@@ -17,8 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import abc
from ..compat import *
from ..utilities import NiftyMetaBase
......
......@@ -17,9 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from .minimizer import Minimizer
from .line_search_strong_wolfe import LineSearchStrongWolfe
from .minimizer import Minimizer
class NonlinearCG(Minimizer):
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from .energy import Energy
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from .descent_minimizer import DescentMinimizer
from .line_search_strong_wolfe import LineSearchStrongWolfe
......
......@@ -17,12 +17,13 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from .. import dobj
from ..compat import *
from .minimizer import Minimizer
from ..field import Field
from .. import dobj
from ..logger import logger
from .iteration_controller import IterationController
from .minimizer import Minimizer
def _toNdarray(fld):
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from .descent_minimizer import DescentMinimizer
......
......@@ -17,8 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..compat import *
from .descent_minimizer import DescentMinimizer
from .line_search_strong_wolfe import LineSearchStrongWolfe
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..multi.multi_field import MultiField
from ..sugar import makeOp
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from .model import Model
......
......@@ -16,6 +16,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..operators.selection_operator import SelectionOperator
from .model import Model
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..nonlinearities import Exponential, PositiveTanh, Tanh
from ..sugar import makeOp
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..field import Field
from ..multi.multi_field import MultiField
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..domain_tuple import DomainTuple
from ..multi.multi_field import MultiField
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..operators.scaling_operator import ScalingOperator
from .model import Model
......
......@@ -17,10 +17,9 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..operators.endomorphic_operator import EndomorphicOperator
from .multi_domain import MultiDomain
from .multi_field import MultiField
......
......@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..domain_tuple import DomainTuple
from ..utilities import frozendict
......
......@@ -17,11 +17,12 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
import numpy as np
from ..compat import *
from ..field import Field
import numpy as np
from .multi_domain import MultiDomain
from ..utilities import frozendict
class MultiField(object):
......
......@@ -17,8 +17,9 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from .compat import *
from .sugar import full, exp, tanh
from .sugar import exp, full, tanh
class Linear(object):
......
......@@ -17,8 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..compat import *
from .linear_operator import LinearOperator
......
......@@ -17,13 +17,14 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..field import Field
from .. import dobj, utilities
from ..compat import *
from ..domain_tuple import DomainTuple
from ..field import Field
from .endomorphic_operator import EndomorphicOperator
from .. import utilities
from .. import dobj
class DiagonalOperator(EndomorphicOperator):
......
......@@ -17,14 +17,16 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from .linear_operator import LinearOperator
from ..utilities import infer_space
from ..field import Field
from ..domain_tuple import DomainTuple
from .. import dobj
from ..compat import *
from ..domain_tuple import DomainTuple
from ..domains.dof_space import DOFSpace
from ..field import Field
from ..utilities import infer_space
from .linear_operator import LinearOperator
class DOFDistributor(LinearOperator):
......
......@@ -17,11 +17,13 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..field import Field
from .. import dobj
from ..compat import *
from ..domain_tuple import DomainTuple
from ..field import Field
from .linear_operator import LinearOperator
......
......@@ -17,9 +17,11 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
import numpy as np
from ..compat import *
from .linear_operator import LinearOperator
import numpy as np
class EndomorphicOperator(LinearOperator):
......
......@@ -17,14 +17,16 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from .. import dobj
from ..compat import *
from ..domain_tuple import DomainTuple
from ..domains.power_space import PowerSpace
from ..domains.rg_space import RGSpace
from ..field import Field
from .linear_operator import LinearOperator
from .. import dobj
class ExpTransform(LinearOperator):
......
......@@ -17,14 +17,15 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from .. import dobj, utilities
from ..compat import *
from ..domain_tuple import DomainTuple
from ..domains.rg_space import RGSpace
from .linear_operator import LinearOperator
from .. import dobj
from .. import utilities
from ..field import Field
from .linear_operator import LinearOperator
class FFTOperator(LinearOperator):
......
......@@ -17,12 +17,13 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from .scaling_operator import ScalingOperator
from .fft_operator import FFTOperator
from ..domain_tuple import DomainTuple
from ..utilities import infer_space
from .diagonal_operator import DiagonalOperator
from ..domain_tuple import DomainTuple
from .fft_operator import FFTOperator
from .scaling_operator import ScalingOperator
def FFTSmoothingOperator(domain, sigma, space=None):
......
......@@ -17,9 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..domains.unstructured_domain import UnstructuredDomain
from ..domain_tuple import DomainTuple
from ..domains.unstructured_domain import UnstructuredDomain
from .linear_operator import LinearOperator
......
......@@ -17,13 +17,14 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from .. import utilities
from ..compat import *
from ..domain_tuple import DomainTuple
from ..domains.rg_space import RGSpace
from .linear_operator import LinearOperator
from .fft_operator import FFTOperator
from .linear_operator import LinearOperator
from .sht_operator import SHTOperator
from .. import utilities
class HarmonicTransformOperator(LinearOperator):
......
......@@ -17,14 +17,16 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..compat import *
from ..logger import logger
from ..minimization.conjugate_gradient import ConjugateGradient
from ..minimization.iteration_controller import IterationController
from ..minimization.quadratic_energy import QuadraticEnergy
from .endomorphic_operator import EndomorphicOperator
from ..sugar import full
from .endomorphic_operator import EndomorphicOperator
class InversionEnabler(EndomorphicOperator):
......
......@@ -17,14 +17,16 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..field import Field
from .. import dobj
from ..compat import *
from ..domain_tuple import DomainTuple
from ..domains.power_space import PowerSpace
from .endomorphic_operator import EndomorphicOperator
from ..field import Field
from ..utilities import infer_space
from ..domain_tuple import DomainTuple
from .. import dobj
from .endomorphic_operator import EndomorphicOperator
class LaplaceOperator(EndomorphicOperator):
......
......@@ -17,9 +17,12 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import abc
import numpy as np
from ..compat import *
from ..utilities import NiftyMetaBase
......
......@@ -17,8 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
import numpy as np
from ..compat import *
from ..domain_tuple import DomainTuple
from ..domains.unstructured_domain import UnstructuredDomain
from ..field import Field
......
......@@ -17,8 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from ..compat import *
from ..multi.multi_domain import MultiDomain
from .selection_operator import SelectionOperator
def MultiAdaptor(target):
......
......@@ -17,9 +17,11 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
import numpy as np