Skip to content

Commit bdd0c7c

Browse files
committed
fix __rand__ for using bitwise_and
1 parent 66f2ccb commit bdd0c7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/tensor/logic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ def _bitwise_op(
10631063
def __rand__(x: Tensor, y: int | bool):
10641064
if isinstance(y, (int, bool)):
10651065
y_tensor = paddle.to_tensor(y, dtype=x.dtype)
1066-
return bitwise_and(y_tensor, x, None, None)
1066+
return bitwise_and(y_tensor, x)
10671067
else:
10681068
raise TypeError(
10691069
f"unsupported operand type(s) for |: '{type(y).__name__}' and 'Tensor'"

0 commit comments

Comments
 (0)