dpctl.tensor.usm_ndarray.imag¶
- usm_ndarray.imag¶
Returns view into imaginary component for arrays with complex data-types and returns new zero array for all other data-types.
- Example:
from dpctl import tensor # Reset imaginary part of complex array z = tensor.ones(100, dtype="c8") z.imag[:] = dpt.pi/2