The in-place elementwise operator cannot operate on the largest dtype for the second value.
>>>importdpctl.tensorasdpt>>>a=dpt.asarray(10, dtype="f4", device="cpu")
>>>b=dpt.asarray(5, dtype="f8", device="cpu")
>>>a+=bTraceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"dpctl/tensor/_usmarray.pyx", line1412, indpctl.tensor._usmarray.usm_ndarray.__iadd__File"path_to_dpctl/dpctl/tensor/_elementwise_common.py", line652, in__call__raiseValueError(
ValueError: Outputarrayof type float64isneeded,gotfloat32
>>>importnumpy>>>a=numpy.asarray(10, dtype="f4")
>>>b=numpy.asarray(5, dtype="f8")
>>>a+=b>>>aarray(15., dtype=float32)
The in-place elementwise operator cannot operate on the largest dtype for the second value.