We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The below code caused a fault in dpnp:
# import dpnp # x = dpnp.ones((4, 5)) # mask = dpnp.full(x.shape[1], True) # x[:, mask] --------------------------------------------------------------------------- IndexError Traceback (most recent call last) Cell In[4], line 1 ----> 1 x[:, mask] File /localdisk/work/antonvol/code/dpnp_dev/dpnp/dpnp/dpnp_array.py:182, in dpnp_array.__getitem__(self, key) 179 if isinstance(key, dpnp_array): 180 key = key.get_array() --> 182 item = self._array_obj.__getitem__(key) 183 if not isinstance(item, dpt.usm_ndarray): 184 raise RuntimeError( 185 "Expected dpctl.tensor.usm_ndarray, got {}" 186 "".format(type(item))) File dpctl/tensor/_usmarray.pyx:716, in dpctl.tensor._usmarray.usm_ndarray.__getitem__() File dpctl/tensor/_slicing.pxi:171, in dpctl.tensor._usmarray._basic_slice_meta() File dpctl/tensor/_slicing.pxi:63, in dpctl.tensor._usmarray._is_integral() File /localdisk/work/antonvol/code/dpnp_dev/dpnp/dpnp/dpnp_array.py:217, in dpnp_array.__index__(self) 216 def __index__(self): --> 217 return self._array_obj.__index__() File dpctl/tensor/_usmarray.pyx:888, in dpctl.tensor._usmarray.usm_ndarray.__index__() IndexError: only integer arrays are valid indices
It looks dpnp wrongly handles indexing use cases when key is a tuple.
The text was updated successfully, but these errors were encountered:
antonwolfy
Successfully merging a pull request may close this issue.
The below code caused a fault in dpnp:
It looks dpnp wrongly handles indexing use cases when key is a tuple.
The text was updated successfully, but these errors were encountered: