diff --git a/pycuda/gpuarray.py b/pycuda/gpuarray.py index 36a39dc3d16e6fae90cf5ec5aabb269457a234d3..a3dbc100738396b897c5699c0de852e1bee92aa1 100644 --- a/pycuda/gpuarray.py +++ b/pycuda/gpuarray.py @@ -211,7 +211,7 @@ class GPUArray: except TypeError: # handle dim-0 ndarrays: if isinstance(shape, np.ndarray): - shape = np.asscalar(shape) + shape = shape.item() assert isinstance(shape, numbers.Integral) s = shape shape = (shape,) @@ -221,7 +221,7 @@ class GPUArray: if isinstance(s, np.integer): # bombs if s is a Python integer - s = np.asscalar(s) + s = s.item() if strides is None: if order == "F":