From 60a3929ac023fd3a60ecfe63abbff9d656e5ebdc Mon Sep 17 00:00:00 2001 From: Lin Manhui Date: Fri, 23 Sep 2022 18:00:14 +0800 Subject: [PATCH] Update floor_divide doc (#46419) --- python/paddle/tensor/math.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/paddle/tensor/math.py b/python/paddle/tensor/math.py index 292a8769a69..92b26df1f02 100644 --- a/python/paddle/tensor/math.py +++ b/python/paddle/tensor/math.py @@ -748,13 +748,14 @@ def divide(x, y, name=None): def floor_divide(x, y, name=None): """ - Floor divide two tensors element-wise. The equation is: + Floor divide two tensors element-wise and rounds the quotinents to the nearest integer toward zero. The equation is: .. math:: - out = x // y + out = trunc(x / y) Note: ``paddle.floor_divide`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting` . + Also note that the name ``floor_divide`` can be misleading, as the quotinents are actually rounded toward zero, not toward negative infinite. Args: x (Tensor): the input tensor, it's data type should be int32, int64. -- GitLab