Commit 006e4b0b authored by Philipp Arras's avatar Philipp Arras
Browse files

More speedups

parent f45e9a35
......@@ -11,7 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2019 Max-Planck-Society
# Copyright(C) 2013-2020 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
......@@ -19,6 +19,7 @@ import numpy as np
import pytest
import nifty6 as ift
from .common import setup_function, teardown_function
......@@ -29,14 +30,12 @@ def _flat_PS(k):
pmp = pytest.mark.parametrize
@pmp('space', [
ift.GLSpace(15),
ift.RGSpace(64, distances=.789),
ift.RGSpace([32, 32], distances=.789)
])
@pmp('space', [ift.GLSpace(5),
ift.RGSpace(5, distances=.789),
ift.RGSpace([2, 2], distances=.789)])
@pmp('nonlinearity', ["tanh", "exp", ""])
@pmp('noise', [1, 1e-2, 1e2])
@pmp('seed', [4, 78, 23])
@pmp('seed', [4, 78])
def test_gaussian_energy(space, nonlinearity, noise, seed):
with ift.random.Context(seed):
dim = len(space.shape)
......
......@@ -25,6 +25,7 @@ from ..common import list2fixture, setup_function, teardown_function
pmp = pytest.mark.parametrize
dtype = list2fixture([np.float64, np.float32, np.complex64, np.complex128])
ntries = 10
def test_part_mf_insert():
......@@ -38,7 +39,7 @@ def test_part_mf_insert():
b = op4 + op5
op = a.partial_insert(b)
fld = ift.from_random('normal', op.domain)
ift.extra.check_jacobian_consistency(op, fld)
ift.extra.check_jacobian_consistency(op, fld, ntries=ntries)
assert_(op.domain is ift.MultiDomain.union(
[op1.domain, op2.domain, op4.domain, op5.domain]))
assert_(op.target is ift.MultiDomain.union(
......
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