-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
When index of an array is a floaing point number, NumPy
raises an IndexError
while dpctl
returns an incorrect result.
>>> import numpy, dpctl, dpctl.tensor as dpt
>>> dpctl.__version__
'0.18.0dev0+235.gd79dae1d2f'
>>> numpy.__version__
'1.26.4'
>>> b=dpt.asarray([1+1j, 2+2j])
>>> b[0.].imag
usm_ndarray([])
>>> b[1.].imag
usm_ndarray([[1., 2.]])
>>> a=numpy.array([1+1j, 2+2j])
>>> a[0.].imag
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
>>> a[1.].imag
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
Metadata
Metadata
Assignees
Labels
No labels