Skip to content
Snippets Groups Projects
Commit 9083858f authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

actx tests: Use actx to conver to numpy

parent ae4bba35
No related branches found
No related tags found
No related merge requests found
...@@ -535,8 +535,8 @@ def test_container_multimap(actx_factory): ...@@ -535,8 +535,8 @@ def test_container_multimap(actx_factory):
# {{{ check # {{{ check
def _check_allclose(f, arg1, arg2, atol=1.0e-14): def _check_allclose(f, arg1, arg2, atol=2.0e-14):
assert np.linalg.norm((f(arg1) - arg2).get()) < atol assert np.linalg.norm(actx.to_numpy(f(arg1) - arg2)) < atol
def func_all_scalar(x, y): def func_all_scalar(x, y):
return x + y return x + y
...@@ -576,8 +576,8 @@ def test_container_arithmetic(actx_factory): ...@@ -576,8 +576,8 @@ def test_container_arithmetic(actx_factory):
# {{{ check # {{{ check
def _check_allclose(f, arg1, arg2, atol=1.0e-14): def _check_allclose(f, arg1, arg2, atol=5.0e-14):
assert np.linalg.norm((f(arg1) - arg2).get()) < atol assert np.linalg.norm(actx.to_numpy(f(arg1) - arg2)) < atol
from functools import partial from functools import partial
from arraycontext import rec_multimap_array_container from arraycontext import rec_multimap_array_container
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment