From 5d6afa4a68b0a8de1302286bf044b7d26079a143 Mon Sep 17 00:00:00 2001 From: Yichao Yu <yyc1992@gmail.com> Date: Fri, 16 May 2014 21:44:15 -0400 Subject: [PATCH] typo ... T_T ... --- pyopencl/array.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyopencl/array.py b/pyopencl/array.py index 9d34763b..252a1811 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -49,10 +49,10 @@ def _get_common_dtype(obj1, obj2, queue): # PyPy does not and is not planning to support object dtype. try: np.dtype(object) - def _dtype_is_array(t): + def _dtype_is_object(t): return t == object except: - def _dtype_is_array(t): + def _dtype_is_object(t): return False # {{{ vector types @@ -518,7 +518,7 @@ class Array(object): # }}} - if _dtype_is_array(dtype): + if _dtype_is_object(dtype): raise TypeError("object arrays on the compute device are not allowed") self.queue = queue @@ -1490,7 +1490,7 @@ def to_device(queue, ary, allocator=None, async=False): *context* argument was deprecated. """ - if _dtype_is_array(ary.dtype): + if _dtype_is_object(ary.dtype): raise RuntimeError("to_device does not work on object arrays.") result = Array(queue, ary.shape, ary.dtype, -- GitLab