diff --git a/python/paddle/tensor/logic.py b/python/paddle/tensor/logic.py index f588a739af96d..f479437c8da6e 100755 --- a/python/paddle/tensor/logic.py +++ b/python/paddle/tensor/logic.py @@ -586,13 +586,9 @@ def equal(x: Tensor, y: Tensor, name: str | None = None) -> Tensor: raise TypeError( f"Type of input args must be float, bool, complex, int or Tensor, but received type {type(y)}" ) - if not isinstance(y, (Variable, paddle.pir.Value, complex)): + if not isinstance(y, (Variable, paddle.pir.Value)): y = full(shape=[], dtype=x.dtype, fill_value=y) - if isinstance(y, complex): - # full not support for complex yet - y = paddle.to_tensor(y) - if in_dynamic_or_pir_mode(): return _C_ops.equal(x, y) else: