You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [1]: import dpctl.tensor as dpt
In [2]: import numpy
In [3]: a = numpy.arange(4)
In [4]: b = dpt.from_numpy(a)
In [5]: b * 2
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-e8bdcb44ebff> in <module>
----> 1 b * 2
TypeError: unsupported operand type(s) for *: 'dpctl.tensor._usmarray.usm_ndarray' and 'int'
In [6]: 2 * b
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-6-fde996378900> in <module>
----> 1 2 * b
/localdisk/work/amakarye/miniconda3/envs/dpnptc4_internal/lib/python3.8/site-packages/dpctl/tensor/_usmarray.pyx in dpctl.tensor._usmarray.usm_ndarray.__mul__()
/localdisk/work/amakarye/miniconda3/envs/dpnptc4_internal/lib/python3.8/site-packages/dpctl/tensor/_usmarray.pyx in dpctl.tensor._usmarray._dispatch_binary_elementwise()
AttributeError: 'int' object has no attribute '__array_namespace__'
Activity
Closes #592
Closes #592
Implemented special methods for usm_ndarray per data-API
Implemented special methods for usm_ndarray per data-API