Skip to content
Snippets Groups Projects
Commit 13304f68 authored by Kaushik Kulkarni's avatar Kaushik Kulkarni Committed by Andreas Klöckner
Browse files

Simplification: do not exit early out of freeze for 0-size arrays


Co-authored-by: default avatarMatthew Smith <mjsmith6@illinois.edu>
parent b0d70e67
No related branches found
No related tags found
No related merge requests found
......@@ -296,17 +296,7 @@ class PytatoPyOpenCLArrayContext(_BasePytatoArrayContext):
raise TypeError(f"{type(self).__name__}.freeze invoked "
f"with non-pytato array of type '{type(array)}'")
if subary.size == 0:
# early exit for 0-sized arrays
key_to_frozen_subary[key] = to_tagged_cl_array(
cla.empty(self.queue.context,
shape=subary.shape,
dtype=subary.dtype,
allocator=self.allocator),
get_cl_axes_from_pt_axes(subary.axes),
subary.tags)
else:
key_to_pt_arrays[key] = subary
key_to_pt_arrays[key] = subary
# }}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment