Commit dbd58167 authored by Philipp Arras's avatar Philipp Arras
Browse files

Reorder imports and delete unused imports

parent 5b0e1b78
......@@ -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
......
......@@ -17,19 +17,22 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import absolute_import, division, print_function
from .compat import *
import sys
import numpy as np
from . import dobj, utilities
from .compat import *
from .domain_tuple import DomainTuple
from .domains.power_space import PowerSpace
from .field import Field
from .multi.multi_field import MultiField
from .logger import logger
from .multi.block_diagonal_operator import BlockDiagonalOperator
from .multi.multi_domain import MultiDomain
from .multi.multi_field import MultiField
from .operators.diagonal_operator import DiagonalOperator
from .operators.power_distributor import PowerDistributor
from .domain_tuple import DomainTuple
from . import dobj, utilities
from .logger import logger
__all__ = ['PS_field', 'power_analyze', 'create_power_operator',
'create_harmonic_smoothing_operator', 'from_random',
......
......@@ -17,12 +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 itertools import product
import abc
from future.utils import with_metaclass
import collections
from itertools import product
import numpy as np
from future.utils import with_metaclass
from .compat import *
__all__ = ["get_slice_list", "safe_cast", "parse_spaces", "infer_space",
"memo", "NiftyMetaBase", "fft_prep", "hartley", "my_fftn_r2c",
......
......@@ -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 setuptools import setup, find_packages
from setuptools import find_packages, setup
def write_version():
......
......@@ -17,8 +17,9 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from builtins import str
from parameterized import parameterized
import numpy as np
from parameterized import parameterized
np.seterr(all='raise', under='ignore')
......
......@@ -17,11 +17,12 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import unittest
import nifty5 as ift
import numpy as np
from itertools import product
from test.common import expand
import nifty5 as ift
import numpy as np
def _flat_PS(k):
return np.ones_like(k)
......
......@@ -17,12 +17,12 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import unittest
import numpy as np
from numpy.testing import assert_equal, assert_allclose, assert_raises
from itertools import product
import nifty5 as ift
from test.common import expand
import nifty5 as ift
import numpy as np
from numpy.testing import assert_allclose, assert_equal, assert_raises
SPACES = [ift.RGSpace((4,)), ift.RGSpace((5))]
SPACE_COMBINATIONS = [(), SPACES[0], SPACES[1], SPACES]
......
......@@ -17,12 +17,13 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import unittest
import numpy as np
from numpy.testing import assert_allclose, assert_equal
import nifty5 as ift
from itertools import product
from test.common import expand
import nifty5 as ift
import numpy as np
from nose.plugins.skip import SkipTest
from numpy.testing import assert_allclose, assert_equal
IC = ift.GradientNormController(tol_abs_gradnorm=1e-5, iteration_limit=1000)
......
......@@ -17,11 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import unittest
import numpy as np
from numpy.testing import assert_equal, assert_allclose, assert_raises
from itertools import product
import nifty5 as ift
from test.common import expand
import numpy as np
from numpy.testing import assert_allclose, assert_equal
dom = ift.makeDomain({"d1": ift.RGSpace(10)})
......
......@@ -17,11 +17,11 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import unittest
import nifty5 as ift
import numpy as np
from itertools import product
from test.common import expand
import nifty5 as ift
import numpy as np
_h_RG_spaces = [ift.RGSpace(7, distances=0.2, harmonic=True),
ift.RGSpace((12, 46), distances=(.2, .3), harmonic=True)]
......
......@@ -17,11 +17,12 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import unittest
from numpy.testing import assert_allclose, assert_equal
import nifty5 as ift
from itertools import product
from test.common import expand
import nifty5 as ift
from numpy.testing import assert_allclose, assert_equal
class ComposedOperator_Tests(unittest.TestCase):
spaces = [ift.RGSpace(4),
......
......@@ -17,12 +17,14 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import division
import unittest
from numpy.testing import assert_equal, assert_allclose
import nifty5 as ift
from itertools import product
from test.common import expand
import nifty5 as ift
from numpy.testing import assert_allclose, assert_equal
class DiagonalOperator_Tests(unittest.TestCase):
spaces = [ift.RGSpace(4),
......
......@@ -17,13 +17,15 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import division
import unittest
import numpy as np
from numpy.testing import assert_allclose
import nifty5 as ift
from itertools import product
from test.common import expand
import nifty5 as ift
import numpy as np
from numpy.testing import assert_allclose
def _get_rtol(tp):
if (tp == np.float64) or (tp == np.complex128):
......
......@@ -17,13 +17,15 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import division
import unittest
import numpy as np
from numpy.testing import assert_allclose
import nifty5 as ift
from itertools import product
from test.common import expand
import nifty5 as ift
import numpy as np
from numpy.testing import assert_allclose
def _get_rtol(tp):
if (tp == np.float64) or (tp == np.complex128):
......
......@@ -17,12 +17,13 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import unittest
import numpy as np
import nifty5 as ift
from numpy.testing import assert_allclose
from itertools import product
from test.common import expand
import nifty5 as ift
import numpy as np
from numpy.testing import assert_allclose
class LaplaceOperatorTests(unittest.TestCase):
@expand(product([None, False, True], [False, True], [10, 100, 1000]))
......
......@@ -17,12 +17,13 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import unittest
import numpy as np
from numpy.testing import assert_allclose
import nifty5 as ift
from itertools import product
from test.common import expand
import nifty5 as ift
import numpy as np
from numpy.testing import assert_allclose
def _get_rtol(tp):
if (tp == np.float64) or (tp == np.complex128):
......
......@@ -16,13 +16,14 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
import itertools
import unittest
from test.common import expand
import numpy as np
import itertools
from numpy.testing import assert_, assert_equal, assert_raises,\
assert_almost_equal
from nifty5 import GLSpace
from test.common import expand
from numpy.testing import (assert_, assert_almost_equal, assert_equal,
assert_raises)
# [nlat, nlon, expected]
CONSTRUCTOR_CONFIGS = [
......
......@@ -17,12 +17,14 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import division
import unittest
from test.common import expand
import numpy as np
from numpy.testing import assert_, assert_equal, assert_raises,\
assert_almost_equal
from nifty5 import HPSpace
from test.common import expand
from numpy.testing import (assert_, assert_almost_equal, assert_equal,
assert_raises)
# [nside, expected]
CONSTRUCTOR_CONFIGS = [
......
......@@ -17,11 +17,12 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import unittest
from numpy.testing import assert_
from itertools import product
from types import LambdaType
from test.common import expand
from types import LambdaType
import nifty5 as ift
from numpy.testing import assert_
spaces = [ift.RGSpace(4),
ift.PowerSpace(ift.RGSpace((4, 4), harmonic=True)),
......
......@@ -17,13 +17,14 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import division
import unittest
import numpy as np
from numpy.testing import assert_, assert_equal, assert_raises,\
assert_allclose
import nifty5 as ift
from test.common import expand
import nifty5 as ift
import numpy as np
from numpy.testing import assert_, assert_allclose, assert_equal, assert_raises
# [lmax, expected]
CONSTRUCTOR_CONFIGS = [
[5, None, {
......
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