Skip to content

Commit d191c75

Browse files
committed
use dpnp.is_supported_array_type
1 parent a74c892 commit d191c75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpnp/dpnp_iface_manipulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def _insert_singleton_index(parameters, indices, values, obj):
329329
# In dpnp, `.item()` calls `.wait()`, so it is preferred to avoid it
330330
# When possible (i.e. for numpy arrays, lists, etc), it is preferred
331331
# to use `.item()` on a NumPy array
332-
if isinstance(obj, (dpnp_array, dpt.usm_ndarray)):
332+
if dpnp.is_supported_array_type(obj):
333333
index = indices.item()
334334
else:
335335
if isinstance(obj, slice):
@@ -1600,7 +1600,7 @@ def delete(arr, obj, axis=None):
16001600
# In dpnp, `.item()` calls `.wait()`, so it is preferred to avoid it
16011601
# When possible (i.e. for numpy arrays, lists, etc), it is
16021602
# preferred to use `.item()` on a NumPy array
1603-
if isinstance(obj, (dpnp_array, dpt.usm_ndarray)):
1603+
if dpnp.is_supported_array_type(obj):
16041604
indices = indices.item()
16051605
else:
16061606
indices = numpy.asarray(obj).item()

0 commit comments

Comments
 (0)