diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index 70c5640946fbfcf1f0f25a02bb881e9bbec20d12..57781304792b71f1189637fcbd242b2c1c2e4515 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