Skip to content
Snippets Groups Projects
Commit 727b587a authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Switch from array.vec to cltypes in image_from_array

parent a37681d4
No related branches found
No related tags found
1 merge request!95Switch from array.vec to cltypes in image_from_array
Pipeline #20008 passed with warnings
......@@ -1777,9 +1777,10 @@ def image_from_array(ctx, ary, num_channels=None, mode="r", norm_int=False):
dtype = ary.dtype
if num_channels is None:
from pyopencl.array import vec
import pyopencl.cltypes
try:
dtype, num_channels = vec.type_to_scalar_and_count[dtype]
dtype, num_channels = \
pyopencl.cltypes.vec_type_to_scalar_and_count[dtype]
except KeyError:
# It must be a scalar type then.
num_channels = 1
......
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