diff --git a/arraycontext/fake_numpy.py b/arraycontext/fake_numpy.py index a117fafff0d015d937e50459407909e8246671bb..ee714f25c277a26f4e3856bdc8dee720bf1ecf23 100644 --- a/arraycontext/fake_numpy.py +++ b/arraycontext/fake_numpy.py @@ -190,7 +190,8 @@ class BaseFakeNumpyLinalgNamespace: # mimics numpy's norm computation return self.norm(_flatten_cl_array(ary), ord=2) - if _is_meshmode_dofarray(ary): + if (_is_meshmode_dofarray(ary) and all([_is_pyopencl_array(subary) + for _, subary in serialize_container(ary)])): from arraycontext.impl import _flatten_cl_array from warnings import warn