Skip to content

Commit

Permalink
to_numpy: thaw(freeze(...)) first
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikcfd committed May 2, 2022
1 parent 046bb52 commit 9877625
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arraycontext/container/traversal.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,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)))

# }}}

Expand Down

0 comments on commit 9877625

Please sign in to comment.