We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44e9fa9 commit d1a90bcCopy full SHA for d1a90bc
dpnp/dpnp_array.py
@@ -174,6 +174,9 @@ def __ge__(self, other):
174
# '__getattribute__',
175
176
def __getitem__(self, key):
177
+ if isinstance(key, dpnp_array):
178
+ key = key.get_array()
179
+
180
item = self._array_obj.__getitem__(key)
181
if not isinstance(item, dpt.usm_ndarray):
182
raise RuntimeError(
@@ -290,6 +293,11 @@ def __rtruediv__(self, other):
290
293
# '__setattr__',
291
294
292
295
def __setitem__(self, key, val):
296
297
298
+ if isinstance(val, dpnp_array):
299
+ val = val.get_array()
300
301
self._array_obj.__setitem__(key, val)
302
303
# '__setstate__',
0 commit comments