From a7f8aff49dd2363686a829be722c19f0baf6dda6 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 23 Sep 2012 15:18:41 -0500 Subject: [PATCH] Minor follow-up fix for image_from_array. --- pyopencl/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index 70c56409..57781304 100644 --- a/pyopencl/__init__.py +++ b/pyopencl/__init__.py @@ -894,7 +894,7 @@ def image_from_array(ctx, ary, num_channels=None, mode="r", norm_int=False): dtype, num_channels = vec.type_to_scalar_and_count[dtype] except KeyError: # It must be a scalar type then. - pass + num_channels = 1 shape = ary.shape strides = ary.strides -- GitLab