def METHOD_NAME(self, x: NDArray) -> NDArray:
    if type(self.diag) is not type(x):
        self.diag = to_cupy_conditional(x, self.diag)
    if self.complex:
        diagadj = self.diag.conj()
    else:
        diagadj = self.diag
    y = diagadj * x
    return y