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 13, 2022
1 parent 2adb510 commit e28071d
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 @@ -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))

# }}}

Expand Down

0 comments on commit e28071d

Please sign in to comment.