Skip to content

Commit

Permalink
np.asscalar -> np.ndarray.item
Browse files Browse the repository at this point in the history
  • Loading branch information
mitkotak committed Jun 24, 2022
1 parent 671fd55 commit 56a1d2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pycuda/gpuarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def __init__(
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,)
Expand All @@ -221,7 +221,7 @@ def __init__(

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":
Expand Down

0 comments on commit 56a1d2a

Please sign in to comment.