From 464a0383f800ba0bd5f135136e28ae050f6c9f23 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Tue, 13 Jul 2021 14:12:03 -0500 Subject: [PATCH] extend some tests to use complex inputs --- test/test_arraycontext.py | 79 ++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/test/test_arraycontext.py b/test/test_arraycontext.py index 4642806..c9c26e2 100644 --- a/test/test_arraycontext.py +++ b/test/test_arraycontext.py @@ -188,6 +188,22 @@ def _thaw_dofarray(ary, actx): # {{{ assert_close_to_numpy* +def randn(shape, dtype): + rng = np.random.default_rng() + dtype = np.dtype(dtype) + + if dtype.kind == "c": + dtype = np.dtype(f"