diff --git a/arraycontext/container/traversal.py b/arraycontext/container/traversal.py index fe486781..a7aebdcd 100644 --- a/arraycontext/container/traversal.py +++ b/arraycontext/container/traversal.py @@ -866,7 +866,10 @@ def _to_numpy_with_check(subary: Any) -> Any: f"array of type '{type(subary).__name__}' not in " f"supported types {actx.array_types}") - return rec_map_array_container(_to_numpy_with_check, ary) + return rec_map_array_container(_to_numpy_with_check, + # do a freeze first, if 'actx' supports + # container-wide freezes + thaw(freeze(ary, actx), actx)) # }}}