From 727b587a899eaf80123157617ac14ddadc85c51c Mon Sep 17 00:00:00 2001 From: "[6~" Date: Tue, 5 Nov 2019 22:57:55 -0600 Subject: [PATCH] Switch from array.vec to cltypes in image_from_array --- pyopencl/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index 17ab8c52..02fa08e1 100644 --- a/pyopencl/__init__.py +++ b/pyopencl/__init__.py @@ -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 -- GitLab