Skip to content

Commit

Permalink
Update floor_divide doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobholamovic committed Sep 23, 2022
1 parent 0a144ca commit e60a122
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/paddle/tensor/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,13 +711,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.
Expand Down

0 comments on commit e60a122

Please sign in to comment.