Commit 9b47dc10 authored by Philipp Arras's avatar Philipp Arras
Browse files

nifty7 -> nifty8

parent 3a83451d
...@@ -109,7 +109,7 @@ def power_analyze(field, spaces=None, binbounds=None, ...@@ -109,7 +109,7 @@ def power_analyze(field, spaces=None, binbounds=None,
Creates a PowerSpace for the space addressed by `spaces` with the Creates a PowerSpace for the space addressed by `spaces` with the
given binning and computes the power spectrum as a given binning and computes the power spectrum as a
:class:`~nifty7.field.Field` over this PowerSpace. This can only :class:`~nifty8.field.Field` over this PowerSpace. This can only
be done if the subspace to be analyzed is a harmonic space. The be done if the subspace to be analyzed is a harmonic space. The
resulting field has the same units as the square of the initial resulting field has the same units as the square of the initial
field. field.
...@@ -603,8 +603,8 @@ def is_operator(obj): ...@@ -603,8 +603,8 @@ def is_operator(obj):
Note Note
---- ----
A simple `isinstance(obj, ift.Operator)` does not give the expected result A simple `isinstance(obj, ift.Operator)` does not give the expected result
because, e.g., :class:`~nifty7.field.Field` inherits from because, e.g., :class:`~nifty8.field.Field` inherits from
:class:`~nifty7.operators.operator.Operator`. :class:`~nifty8.operators.operator.Operator`.
""" """
return isinstance(obj, Operator) and obj.val is None return isinstance(obj, Operator) and obj.val is None
...@@ -621,8 +621,8 @@ def is_fieldlike(obj): ...@@ -621,8 +621,8 @@ def is_fieldlike(obj):
---- ----
A simple `isinstance(obj, ift.Field)` does not give the expected result A simple `isinstance(obj, ift.Field)` does not give the expected result
because users might have implemented another class which behaves field-like because users might have implemented another class which behaves field-like
but is not an instance of :class:`~nifty7.field.Field`. Also note that but is not an instance of :class:`~nifty8.field.Field`. Also note that
instances of :class:`~nifty7.linearization.Linearization` behave instances of :class:`~nifty8.linearization.Linearization` behave
field-like. field-like.
""" """
return isinstance(obj, Operator) and obj.val is not None return isinstance(obj, Operator) and obj.val is not None
...@@ -395,7 +395,7 @@ def lognormal_moments(mean, sigma, N=0): ...@@ -395,7 +395,7 @@ def lognormal_moments(mean, sigma, N=0):
"""Calculates the parameters for a normal distribution `n(x)` """Calculates the parameters for a normal distribution `n(x)`
such that `exp(n)(x)` has the mean and standard deviation given. such that `exp(n)(x)` has the mean and standard deviation given.
Used in :func:`~nifty7.normal_operators.LognormalTransform`.""" Used in :func:`~nifty8.normal_operators.LognormalTransform`."""
mean, sigma = (value_reshaper(param, N) for param in (mean, sigma)) mean, sigma = (value_reshaper(param, N) for param in (mean, sigma))
if not np.all(mean > 0): if not np.all(mean > 0):
raise ValueError("mean must be greater 0; got {!r}".format(mean)) raise ValueError("mean must be greater 0; got {!r}".format(mean))
......
...@@ -27,10 +27,10 @@ def list2fixture(lst): ...@@ -27,10 +27,10 @@ def list2fixture(lst):
def setup_function(): def setup_function():
import nifty7 as ift import nifty8 as ift
ift.random.push_sseq_from_seed(42) ift.random.push_sseq_from_seed(42)
def teardown_function(): def teardown_function():
import nifty7 as ift import nifty8 as ift
ift.random.pop_sseq() ift.random.pop_sseq()
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import numpy as np import numpy as np
import pytest import pytest
import nifty7 as ift import nifty8 as ift
from .common import list2fixture, setup_function, teardown_function from .common import list2fixture, setup_function, teardown_function
......
...@@ -19,7 +19,7 @@ from time import time ...@@ -19,7 +19,7 @@ from time import time
import numpy as np import numpy as np
import pytest import pytest
import nifty7 as ift import nifty8 as ift
from .common import list2fixture, setup_function, teardown_function from .common import list2fixture, setup_function, teardown_function
......
...@@ -19,7 +19,7 @@ import numpy as np ...@@ -19,7 +19,7 @@ import numpy as np
import pytest import pytest
from numpy.testing import assert_allclose, assert_equal, assert_raises from numpy.testing import assert_allclose, assert_equal, assert_raises
import nifty7 as ift import nifty8 as ift
from .common import setup_function, teardown_function from .common import setup_function, teardown_function
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import numpy as np import numpy as np
import pytest import pytest
import nifty7 as ift import nifty8 as ift
from .common import setup_function, teardown_function from .common import setup_function, teardown_function
......
...@@ -19,8 +19,8 @@ import numpy as np ...@@ -19,8 +19,8 @@ import numpy as np
import pytest import pytest
from numpy.testing import assert_allclose, assert_raises from numpy.testing import assert_allclose, assert_raises
import nifty7 as ift import nifty8 as ift
from nifty7 import myassert from nifty8 import myassert
from .common import setup_function, teardown_function from .common import setup_function, teardown_function
......
...@@ -19,7 +19,7 @@ import numpy as np ...@@ -19,7 +19,7 @@ import numpy as np
import pytest import pytest
from numpy.testing import assert_allclose from numpy.testing import assert_allclose
import nifty7 as ift import nifty8 as ift
from .common import setup_function, teardown_function from .common import setup_function, teardown_function
......
...@@ -19,7 +19,7 @@ import numpy as np ...@@ -19,7 +19,7 @@ import numpy as np
import pytest import pytest
from numpy.testing import assert_allclose, assert_equal from numpy.testing import assert_allclose, assert_equal
import nifty7 as ift import nifty8 as ift
from .common import setup_function, teardown_function from .common import setup_function, teardown_function
......
...@@ -20,7 +20,7 @@ import pytest ...@@ -20,7 +20,7 @@ import pytest
from mpi4py import MPI from mpi4py import MPI
from numpy.testing import assert_equal, assert_raises from numpy.testing import assert_equal, assert_raises
import nifty7 as ift import nifty8 as ift
from ..common import setup_function, teardown_function from ..common import setup_function, teardown_function
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import numpy as np import numpy as np
from numpy.testing import assert_allclose, assert_equal from numpy.testing import assert_allclose, assert_equal
import nifty7 as ift import nifty8 as ift
from .common import setup_function, teardown_function from .common import setup_function, teardown_function
......
...@@ -21,7 +21,7 @@ from copy import deepcopy ...@@ -21,7 +21,7 @@ from copy import deepcopy
import numpy as np import numpy as np
from numpy.testing import assert_allclose from numpy.testing import assert_allclose
import nifty7 as ift import nifty8 as ift
class CountingOp(ift.Operator): class CountingOp(ift.Operator):
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import numpy as np import numpy as np
import pytest import pytest
import nifty7 as ift import nifty8 as ift
from ..common import list2fixture, setup_function, teardown_function from ..common import list2fixture, setup_function, teardown_function
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import numpy as np import numpy as np
import nifty7 as ift import nifty8 as ift
Nsamp = 20000 Nsamp = 20000
np.random.seed(42) np.random.seed(42)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
from numpy.testing import assert_allclose, assert_equal from numpy.testing import assert_allclose, assert_equal
import nifty7 as ift import nifty8 as ift
from ..common import list2fixture, setup_function, teardown_function from ..common import list2fixture, setup_function, teardown_function
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import numpy as np import numpy as np
from numpy.testing import assert_allclose from numpy.testing import assert_allclose
import nifty7 as ift import nifty8 as ift
from ..common import setup_function, teardown_function from ..common import setup_function, teardown_function
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import numpy as np import numpy as np
from numpy.testing import assert_allclose from numpy.testing import assert_allclose
import nifty7 as ift import nifty8 as ift
from ..common import setup_function, teardown_function from ..common import setup_function, teardown_function
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import numpy as np import numpy as np
from numpy.testing import assert_allclose from numpy.testing import assert_allclose
import nifty7 as ift import nifty8 as ift
from ..common import list2fixture, setup_function, teardown_function from ..common import list2fixture, setup_function, teardown_function
......
...@@ -19,7 +19,7 @@ import numpy as np ...@@ -19,7 +19,7 @@ import numpy as np
import pytest import pytest
from numpy.testing import assert_allclose from numpy.testing import assert_allclose
import nifty7 as ift import nifty8 as ift
from ..common import setup_function, teardown_function from ..common import setup_function, teardown_function
......
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