diff --git a/pyopencl/array.py b/pyopencl/array.py index 6674d8d9cd0fb0ea51367428dce5d3e95029fc2b..ce7b5f7243def0b35141e60b80352ba1013711a8 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -2443,7 +2443,7 @@ def arange(queue, *args, **kwargs): raise TypeError("arange requires a dtype argument") from math import ceil - size = int(ceil((stop-start)/step)) + size = ceil((stop-start)/step) result = Array(queue, (size,), dtype, allocator=inf.allocator) result.add_event(_arange_knl(result, start, step, queue=queue)) diff --git a/pyopencl/cltypes.py b/pyopencl/cltypes.py index dc853742c7c53034c70eff878eb1f484c63b9589..69c29fc4e6415a23f1615dbd7d41e79f8eaf5274 100644 --- a/pyopencl/cltypes.py +++ b/pyopencl/cltypes.py @@ -50,7 +50,7 @@ double = np.float64 # {{{ vector types def _create_vector_types(): - _mapping = [(k, globals()[k]) for k in + mapping = [(k, globals()[k]) for k in ["char", "uchar", "short", "ushort", "int", "uint", "long", "ulong", "float", "double"]] @@ -64,7 +64,7 @@ def _create_vector_types(): counts = [2, 3, 4, 8, 16] - for base_name, base_type in _mapping: + for base_name, base_type in mapping: for count in counts: name = "%s%d" % (base_name, count)